mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
added linker option to check for --hash-style availability
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2531 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
711f5f948e
commit
f630dd8377
16
Makefile
16
Makefile
@ -28,6 +28,11 @@ RELEASE_DIR = Release
|
||||
DEBUG_DIR = Debug
|
||||
MAKEFILE = Makefile
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# fixes shared object lookup error(SIGFPE floating point exception)
|
||||
HASH_STYLE=$(call ld-option, -Wl$(comma)--hash-style=sysv)
|
||||
|
||||
|
||||
#########################
|
||||
#### Serial Versions ####
|
||||
#########################
|
||||
@ -90,7 +95,7 @@ ifeq ($(CFG), RELEASE)
|
||||
CXX = g++
|
||||
CXXFLAGS = -Wall -pedantic -O3 $(DEFINES) $(INCLUDES)
|
||||
OBJECT_FILES = $(COMMON_COBJS) $(COMMON_CXXOBJS) $(CL1MP_OBJS)
|
||||
LD_FLAGS = -lm ${CL1MP_LIB}
|
||||
LD_FLAGS = -lm ${CL1MP_LIB} ${HASH_STYLE}
|
||||
endif
|
||||
|
||||
ifeq ($(CFG), DEBUG)
|
||||
@ -100,7 +105,7 @@ ifeq ($(CFG), DEBUG)
|
||||
CXX = g++
|
||||
CXXFLAGS = -Wall -g $(DEFINES) $(INCLUDES)
|
||||
OBJECT_FILES = $(COMMON_COBJS) $(COMMON_CXXOBJS) $(CL1MP_OBJS)
|
||||
LD_FLAGS = -lm ${CL1MP_LIB}
|
||||
LD_FLAGS = -lm ${CL1MP_LIB} ${HASH_STYLE}
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@ -430,6 +435,13 @@ tester:
|
||||
svn status -q ../mytest
|
||||
svn status -q ../examples
|
||||
|
||||
#ld-option
|
||||
# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=sysv)
|
||||
comma=,
|
||||
ld-option = $(shell if $(CC) $(1) \
|
||||
-nostdlib -o /dev/null -xc /dev/null \
|
||||
> /dev/null 2>&1 ; then echo "$(1)" ; else echo "$(2)"; fi)
|
||||
|
||||
# =============================================================================
|
||||
# End of makefile.
|
||||
# =============================================================================
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user