Skip to content

Commit

Permalink
Change libgc to libomcgc to make sure we link against the correct ver…
Browse files Browse the repository at this point in the history
…sion of boehm-gc

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25319 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Mar 30, 2015
1 parent 2b4c9de commit 055bfe8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Compiler/runtime/omc_config.h
Expand Up @@ -39,7 +39,7 @@
#define DEFAULT_MAKE "make"

/* adrpo: add -loleaut32 as is used by ExternalMedia */
#define DEFAULT_LDFLAGS "-lregex -lexpat -lgc -lpthread -fopenmp -loleaut32"
#define DEFAULT_LDFLAGS "-lregex -lexpat -lomcgc -lpthread -fopenmp -loleaut32"

#define CONFIG_PLATFORM "WIN32"
#define CONFIG_MODELICA_SPEC_PLATFORM "win32"
Expand All @@ -55,7 +55,7 @@
#endif

/* adrpo: add -loleaut32 as is used by ExternalMedia */
#define BASIC_LDFLAGS_RT " -lgc -lexpat -lregex -static-libgcc -luuid -loleaut32 -lole32 -lws2_32 -llis -lumfpack -lamd -lsundials_kinsol -lsundials_nvecserial -lipopt -lcoinmumps -lpthread -lm -lgfortranbegin -lgfortran -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -llapack-mingw -lcminpack -ltmglib-mingw -lblas-mingw -lf2c"
#define BASIC_LDFLAGS_RT " -lomcgc -lexpat -lregex -static-libgcc -luuid -loleaut32 -lole32 -lws2_32 -llis -lumfpack -lamd -lsundials_kinsol -lsundials_nvecserial -lipopt -lcoinmumps -lpthread -lm -lgfortranbegin -lgfortran -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -llapack-mingw -lcminpack -ltmglib-mingw -lblas-mingw -lf2c"
#define LDFLAGS_RT " -lOpenModelicaRuntimeC" BASIC_LDFLAGS_RT
#define LDFLAGS_RT_SIM " -lSimulationRuntimeC" BASIC_LDFLAGS_RT " -lwsock32 -lstdc++"
#define CONFIG_EXE_EXT ".exe"
Expand Down
6 changes: 3 additions & 3 deletions Makefile.common
Expand Up @@ -88,10 +88,10 @@ libgc-dev: /usr/include/gc/new_gc_alloc.h
libgc-dev: /usr/include/gc/weakpointer.h

boehm-gc: mkbuilddirs boehm-gc-lib build/include/omc/c/gc.h build/include/omc/c/gc_config_macros.h build/include/omc/c/gc_version.h build/include/omc/c/gc_pthread_redirects.h
build/lib/omc/libgc.a: 3rdParty/gc/.libs/libgc.a mkbuilddirs
build/lib/omc/libomcgc.a: 3rdParty/gc/.libs/libomcgc.a mkbuilddirs
cp -p $< $@
3rdParty/gc/.libs/libgc.a: 3rdParty/gc/Makefile
$(MAKE) -C 3rdParty/gc/
3rdParty/gc/.libs/libomcgc.a: 3rdParty/gc/Makefile
$(MAKE) -C 3rdParty/gc/ libomcgc.la
build/include/omc/c/gc.h: 3rdParty/gc/include/gc.h mkbuilddirs
cp -pPR $< $@
build/include/omc/c/gc_config_macros.h: 3rdParty/gc/include/gc_config_macros.h mkbuilddirs
Expand Down
8 changes: 4 additions & 4 deletions Makefile.in
Expand Up @@ -61,11 +61,11 @@ settings:
omc: omc-bootstrapped

boehm-gc-lib: @LIBGC@
build/lib/omc/libgc.so: 3rdParty/gc/.libs/libgc.so
build/lib/omc/libomcgc.so: 3rdParty/gc/.libs/libomcgc.so
mkdir -p build/lib/omc/
cp -pPR $< $<.* build/lib/omc/
3rdParty/gc/.libs/libgc.so: 3rdParty/gc/Makefile
$(MAKE) -C 3rdParty/gc/
3rdParty/gc/.libs/libomcgc.so: 3rdParty/gc/Makefile
$(MAKE) -C 3rdParty/gc/ libomcgc.la

qtclean-common:
rm -rf OMShell/bin/OMShell$(EXE) OMShell/OMShellGUI/omc_communication.*
Expand Down Expand Up @@ -238,5 +238,5 @@ emcc: msl-external-libs-emcc emcc-simulationruntime
emcc-simulationruntime:
mkdir -p build/lib/omc/emcc/
$(MAKE) -C SimulationRuntime/c emcc

copycppheader:
22 changes: 11 additions & 11 deletions configure.in
Expand Up @@ -774,21 +774,21 @@ if test "$DARWIN" = "1"; then
APP=".app"
EXE=".app"
SHREXT=".dylib"
LIBGC="build/lib/omc/libgc.a"
LIBGC="build/lib/omc/libomcgc.a"
LIBSIMULATION=libSimulationRuntimeC.dylib
LIBRUNTIME=libOpenModelicaRuntimeC.dylib
LIBFMIRUNTIME=libOpenModelicaFMIRuntimeC.dylib
LIBFMILIB=libfmilib_shared.dylib
FMILIB_SHARED=ON
LIBCMINPACKLIB=libcminpack.dylib
CMINPACKLIB_SHARED=ON
RT_LDFLAGS_SIM="$LDFLAGS $RT_LDFLAGS -lexpat -lgc -lpthread -lm $LIBDL -lstdc++"
RT_LDFLAGS_SIM="$LDFLAGS $RT_LDFLAGS -lexpat -lomcgc -lpthread -lm $LIBDL -lstdc++"
RT_LDFLAGS_SIM_OPTIONAL="$SUNDIALS_LDFLAGS $IPOPT_LDFLAGS $UMFPACK_LDFLAGS -llis -lcdaskr -lcminpack -liconv"
RT_LDFLAGS="$LDFLAGS $RT_LDFLAGS $LD_LAPACK -lgc -lm -lpthread $LIBDL -lstdc++"
RT_LDFLAGS="$LDFLAGS $RT_LDFLAGS $LD_LAPACK -lomcgc -lm -lpthread $LIBDL -lstdc++"
RT_LDFLAGS_OPTIONAL="$RT_LDFLAGS_OPTIONAL -liconv"
# All libraries are dynamically linked; we don't need anything else
RT_LDFLAGS_GENERATED_CODE="$LDFLAGS -lOpenModelicaRuntimeC $LD_LAPACK -lm"
RT_LDFLAGS_GENERATED_CODE_SIM="$LDFLAGS -lSimulationRuntimeC $LD_LAPACK -lm -lgc"
RT_LDFLAGS_GENERATED_CODE_SIM="$LDFLAGS -lSimulationRuntimeC $LD_LAPACK -lm -lomcgc"
LINK="cp -fr"
RPATH="-Wl,-rpath,'@loader_path/../lib/omc'"
RPATH_QMAKE="-Wl,-rpath,'@loader_path/../../../../lib/omc',-rpath,'@loader_path/../../../../lib/',-rpath,'$PREFIX/lib/omc',-rpath,'$PREFIX/lib/'"
Expand All @@ -803,17 +803,17 @@ elif test "$host" = "i586-pc-mingw32msvc"; then
EXE=".exe"
# Yes, we build static libs on Windows, so the "shared" extension is .a
SHREXT=".a"
LIBGC="build/lib/omc/libgc.a"
LIBGC="build/lib/omc/libomcgc.a"
LIBSIMULATION=libSimulationRuntimeC.a
LIBRUNTIME=libOpenModelicaRuntimeC.a
LIBFMIRUNTIME=libOpenModelicaFMIRuntimeC.a
LIBFMILIB=libfmilib.a
FMILIB_SHARED=OFF
LIBCMINPACKLIB=libcminpack.a
CMINPACKLIB_SHARED=OFF
RT_LDFLAGS_SIM="$LDFLAGS $RT_LDFLAGS -lstdc++ -lgc -lexpat -lm"
RT_LDFLAGS_SIM="$LDFLAGS $RT_LDFLAGS -lstdc++ -lomcgc -lexpat -lm"
RT_LDFLAGS_SIM_OPTIONAL="$SUNDIALS_LDFLAGS $IPOPT_LDFLAGS $UMFPACK_LDFLAGS -llis -lcminpack"
RT_LDFLAGS="$LDFLAGS $RT_LDFLAGS $LD_LAPACK -lgc -lexpat -lpthread -lm"
RT_LDFLAGS="$LDFLAGS $RT_LDFLAGS $LD_LAPACK -lomcgc -lexpat -lpthread -lm"
RT_LDFLAGS_OPTIONAL="$RT_LDFLAGS_OPTIONAL"
RT_LDFLAGS_GENERATED_CODE="$LDFLAGS -lOpenModelicaRuntimeC $RT_LDFLAGS"
RT_LDFLAGS_GENERATED_CODE_SIM="$LDFLAGS -lSimulationRuntimeC -lcdaskr $RT_LDFLAGS_SIM"
Expand All @@ -828,7 +828,7 @@ else
APP=""
EXE=""
SHREXT=".so"
LIBGC="build/lib/omc/libgc.so"
LIBGC="build/lib/omc/libomcgc.so"
LIBSIMULATION=libSimulationRuntimeC.so
LIBRUNTIME=libOpenModelicaRuntimeC.so
LIBFMIRUNTIME=libOpenModelicaFMIRuntimeC.so
Expand All @@ -838,13 +838,13 @@ else
CMINPACKLIB_SHARED=ON
# For static runtime on Linux:
# -Wl,-whole-archive -lSimulationRuntimeC -Wl,-no-whole-archive
RT_LDFLAGS_SIM="$LDFLAGS -Wl,-z,origin -Wl,-rpath,'\$\$ORIGIN' $RT_LDFLAGS $LIBRT -lexpat -lgc -lpthread -lm $LIBDL -lstdc++ -rdynamic"
RT_LDFLAGS_SIM="$LDFLAGS -Wl,-z,origin -Wl,-rpath,'\$\$ORIGIN' $RT_LDFLAGS $LIBRT -lexpat -lomcgc -lpthread -lm $LIBDL -lstdc++ -rdynamic"
RT_LDFLAGS_SIM_OPTIONAL="$SUNDIALS_LDFLAGS $IPOPT_LDFLAGS $UMFPACK_LDFLAGS -llis -lcdaskr -lcminpack"
RT_LDFLAGS="$LDFLAGS $RT_LDFLAGS $LD_LAPACK -lgc $LIBRT -lpthread -lm $LIBDL -lstdc++ -rdynamic"
RT_LDFLAGS="$LDFLAGS $RT_LDFLAGS $LD_LAPACK -lomcgc $LIBRT -lpthread -lm $LIBDL -lstdc++ -rdynamic"
RT_LDFLAGS_OPTIONAL="$RT_LDFLAGS_OPTIONAL"
# All libraries are dynamically linked; we don't need anything else
RT_LDFLAGS_GENERATED_CODE="$LDFLAGS -lOpenModelicaRuntimeC $LD_LAPACK -lm -lpthread -rdynamic"
RT_LDFLAGS_GENERATED_CODE_SIM="$LDFLAGS -lSimulationRuntimeC $LD_LAPACK -lm -lgc -lpthread -rdynamic"
RT_LDFLAGS_GENERATED_CODE_SIM="$LDFLAGS -lSimulationRuntimeC $LD_LAPACK -lm -lomcgc -lpthread -rdynamic"
LINK="cp -frl"
RPATH="-Wl,-z,origin -Wl,-rpath,'\$\$ORIGIN/../lib/omc' -Wl,-rpath,'\$\$ORIGIN'"
RPATH_QMAKE="-Wl,-z,origin -Wl,-rpath,\\'\\\$\$ORIGIN/../lib/omc\\' -Wl,-rpath,\\'\\\$\$ORIGIN\\'"
Expand Down

0 comments on commit 055bfe8

Please sign in to comment.