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.