Issue Details (XML | Word | Printable)

Key: CORE-3606
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Mariusz Zynel
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Linker commands that use c or c++ compiler should apply CFLAGS and CXXFLAGS respectively

Created: 22/Sep/11 08:31 AM   Updated: 23/Apr/13 01:13 PM
Component/s: Build Issues / Porting
Affects Version/s: 2.5.0
Fix Version/s: 2.5.2, 3.0 Alpha 1

Time Tracking:
Not Specified

Environment: Solaris 10 U8 x86 Sun studio 12: cc: Sun C 5.9 SunOS_i386 Patch 124868-10 2009/04/30

Planning Status: Unspecified


 Description  « Hide
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)

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.