# security/libgcrypt individual variable for port in make.conf



## bagas (Oct 23, 2020)

Hello.
Please tell me why it does not work?
Cecurity/libgcrypt port requires assembly CFLAGS = '-O0 -pipe' .
I add to make.conf

```
.if ${.CURDIR:M*/ports/security/libgcrypt}
MAKE_JOBS_UNSAFE=yes
CFLAGS =' -O0 -pipe'
.endif
```
Does not work.
My system make.conf

```
CPUTYPE?=nocona
CFLAGS= -O -pipe
MAKE_JOBS_NUMBER=6
KERNCONF=sys_09082016
OPTIONS_UNSET=DOCS X11 IPV6 CUPS
DEFAULT_VERSIONS+=ssl=openssl
security_libgcrypt_SET_FORSE=CFLAGS =' -O0 -pipe'
.if ${.CURDIR:M*/ports/security/libgcrypt}
MAKE_JOBS_UNSAFE=yes
CFLAGS =' -O0 -pipe'
.endif
```


----------



## SirDice (Oct 23, 2020)

Remove all CFLAGS from make.conf. They are already set to the proper values automatically. There is no need to "optimize" them. By overruling them you're actually causing more problems.


----------



## ekvz (Oct 23, 2020)

While i haven't run into problems yet in respect to setting agressive CFLAGS in make.conf (i am appending not downright overwriting them though) i tend to agree with SirDice. Besides that there is spelling errors in your make.conf. It's spelled _FORCE_ not _FORSE_ (not i know anything about the functionality you seemingly want to use so it might still do nothing even if spelled right). Also i have my doubts if `make` knows the concept of quoted strings. If those end up on the command line as is it's not very surprising for the build to fail.

Edit: Not enough coffee... Rereading the pasted snippet it seems there is no effort made to set any kind of special CFLAGS at all. There is just the attempt to set them to _-O0 -pipe_ for libgcrypt only. Why are you doing this???


----------



## bagas (Oct 23, 2020)

SirDice said:


> Remove all CFLAGS from make.conf. They are already set to the proper values automatically. There is no need to "optimize" them. By overruling them you're actually causing more problems.


Thanks for the clarification.


----------

