Opened 10 years ago
Closed 10 years ago
#286 closed defect (worksforme)
auto/make LINK variable doesn't reflect CFLAGS
|Reported by:||Chris Nehren||Owned by:||sb|
|uname -a:||SunOS cnehrenbuild 5.11 omnios-eae537b i86pc i386 i86pc|
|nginx -V:||Can't get it to build, so no nginx -V, but this applies to 1.2.6 and 1.3.11.|
The auto/make script sets some variables like $CC, $CFLAGS, and $LINK. It applies $CFLAGS to $CC which is correct. However, it sets $LINK to $CC without respecting $CFLAGS, which causes problems like
ld: fatal: file objs/src/core/nginx.o: wrong ELF class: ELFCLASS64 ld: fatal: file processing errors. No output written to objs/nginx collect2: ld returned 1 exit status
when trying to build nginx 64bit on illumos.
Change History (3)
by , 10 years ago
comment:1 by , 10 years ago
|Status:||new → assigned|
Sergey, please take a look.
comment:2 by , 10 years ago
|Status:||assigned → closed|
It seems you have defined CFLAGS environment variable, and thus turned off normal nginx configuration, so if this is the case it is your obligation to provide correct flags to compiler and linker. You could add necessary linker options by --with-ld-opt=.
If the only thing you want is to build nginx, you have no need to define CFLAGS, instead you should add --with-cpu-opt=amd64 --with-cc=/path/to/c/compiler to nginx configure.
As to LINK variable it is incorrect place for linker options in any case, use CORE_LINK instead.
patch for auto/make to fix problem