Linker commands that use cc or CC should apply CFLAGS and CXXFLAGS respectively
--------------------------------------------------------------------------------
Key: CORE-3606
URL: http://tracker.firebirdsql.org/browse/CORE-3606
Project: Firebird Core
Issue Type: Bug
Components: Build Issues / Porting
Affects Versions: 2.5.0
Environment: Solaris 10 U8 x86 Sun studio 12: cc: Sun C 5.9 SunOS_i386
Patch 124868-10 2009/04/30
Reporter: Mariusz Zynel
After conffigure is run I have the following in make.defaults:
# LINKER COMMANDS
LIB_LINK:= CC $(GLOB_OPTIONS)
STATICLIB_LINK:= ar cruvs
CLIENTLIB_LINK:= cc -xc99=all $(GLOB_OPTIONS)
EXE_LINK:= CC $(GLOB_OPTIONS)
STATICEXE_LINK:= CC $(GLOB_OPTIONS)
The problem is that both cc and CC assume -m32 memory model by default and when
building 64bit binaries linker ld tries to generate 32bit object off 64bit
objects. The following is reported:
ld: fatal: file ../temp/boot/jrd/dsc.o: wrong ELF class: ELFCLASS64
and the compilation breaks.
It can be easily fixed by the following change in make.defaults:
LIB_LINK:= CC $(GLOB_OPTIONS) $(CXXFLAGS)
CLIENTLIB_LINK:= cc -xc99=all $(GLOB_OPTIONS) $(CFLAGS)
EXE_LINK:= CC $(GLOB_OPTIONS) $(CXXFLAGS)
STATICEXE_LINK:= CC $(GLOB_OPTIONS) $(CXXFLAGS)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel