forked from Lainports/opnsense-ports
110 lines
4.4 KiB
Text
110 lines
4.4 KiB
Text
--- configure.orig 2015-05-12 14:46:37 UTC
|
|
+++ configure
|
|
@@ -446,7 +446,7 @@ esac
|
|
|
|
# Configure compiler to use in further tests
|
|
|
|
-cc="$bytecc -O $bytecclinkopts"
|
|
+cc="$bytecc $bytecclinkopts"
|
|
export cc cclibs verbose
|
|
|
|
# Check C compiler
|
|
@@ -690,7 +690,7 @@ if test $with_sharedlibs = "yes"; then
|
|
shared_libraries_supported=true;;
|
|
*-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
|
|
sharedcccompopts="-fPIC"
|
|
- mksharedlib="$bytecc -shared"
|
|
+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
|
|
bytecclinkopts="$bytecclinkopts -Wl,-E"
|
|
byteccrpath="-Wl,-rpath,"
|
|
mksharedlibrpath="-Wl,-rpath,"
|
|
@@ -700,7 +700,7 @@ if test $with_sharedlibs = "yes"; then
|
|
case "$bytecc" in
|
|
*gcc*)
|
|
sharedcccompopts="-fPIC"
|
|
- mksharedlib="$bytecc -shared"
|
|
+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
|
|
byteccrpath="-Wl,-rpath,"
|
|
mksharedlibrpath="-Wl,-rpath,"
|
|
shared_libraries_supported=true;;
|
|
@@ -716,11 +716,11 @@ if test $with_sharedlibs = "yes"; then
|
|
*gcc*)
|
|
sharedcccompopts="-fPIC"
|
|
if sh ./solaris-ld; then
|
|
- mksharedlib="$bytecc -shared"
|
|
+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
|
|
byteccrpath="-R"
|
|
mksharedlibrpath="-R"
|
|
else
|
|
- mksharedlib="$bytecc -shared"
|
|
+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
|
|
bytecclinkopts="$bytecclinkopts -Wl,-E"
|
|
natdynlinkopts="-Wl,-E"
|
|
byteccrpath="-Wl,-rpath,"
|
|
@@ -744,12 +744,12 @@ if test $with_sharedlibs = "yes"; then
|
|
mksharedlibrpath="-rpath "
|
|
shared_libraries_supported=true;;
|
|
i[3456]86-*-darwin[89].*)
|
|
- mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
|
|
+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
|
|
bytecccompopts="$dl_defs $bytecccompopts"
|
|
dl_needs_underscore=false
|
|
shared_libraries_supported=true;;
|
|
*-apple-darwin*)
|
|
- mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
|
|
+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
|
|
bytecccompopts="$dl_defs $bytecccompopts"
|
|
dl_needs_underscore=false
|
|
shared_libraries_supported=true;;
|
|
@@ -759,7 +759,7 @@ if test $with_sharedlibs = "yes"; then
|
|
shared_libraries_supported=false;;
|
|
*-*-openbsd*)
|
|
sharedcccompopts="-fPIC"
|
|
- mksharedlib="$bytecc -shared"
|
|
+ mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts -shared"
|
|
bytecclinkopts="$bytecclinkopts -Wl,-E"
|
|
natdynlinkopts="-Wl,-E"
|
|
byteccrpath="-Wl,-rpath,"
|
|
@@ -889,7 +889,7 @@ else
|
|
fi
|
|
|
|
nativecccompopts=''
|
|
-nativecclinkopts=''
|
|
+nativecclinkopts=""
|
|
# FIXME the naming of nativecclinkopts is broken: these are options for
|
|
# ld (for shared libs), not for cc
|
|
nativeccrpath="$byteccrpath"
|
|
@@ -1601,6 +1601,7 @@ if test "$x11_include" = "not found"; th
|
|
else
|
|
x11_libs="-L$dir"
|
|
case "$target" in
|
|
+ *-*-freebsd*|*-*-dragonfly*) x11_link="-L$dir -lX11";;
|
|
*-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
|
|
*-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
|
|
*) x11_link="-L$dir -lX11";;
|
|
@@ -1644,10 +1645,10 @@ echo "X11_LINK=$x11_link" >> Makefile
|
|
# Look for BFD library
|
|
|
|
if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \
|
|
- sh ./hasgot -DPACKAGE=ocaml -lbfd -ldl -liberty -lz bfd_openr; then
|
|
+ sh ./hasgot -DPACKAGE=ocaml -lbfd $dllib -liberty -lz bfd_openr; then
|
|
inf "BFD library found."
|
|
echo "#define HAS_LIBBFD" >> s.h
|
|
- echo "LIBBFD_LINK=-lbfd -ldl -liberty -lz" >> Makefile
|
|
+ echo "LIBBFD_LINK=-lbfd $dllib -liberty -lz" >> Makefile
|
|
else
|
|
wrn "BFD library not found, 'objinfo' will be unable to display info on .cmxs files."
|
|
echo "LIBBFD_LINK=" >> Makefile
|
|
@@ -1686,12 +1687,6 @@ if $no_naked_pointers; then
|
|
echo "#define NO_NAKED_POINTERS" >> m.h
|
|
fi
|
|
|
|
-# Add Unix-style optimization flag
|
|
-bytecccompopts="-O $bytecccompopts"
|
|
-dllcccompopts="-O $dllcccompopts"
|
|
-nativecccompopts="-O $nativecccompopts"
|
|
-sharedcccompopts="-O $sharedcccompopts"
|
|
-
|
|
# Final twiddling of compiler options to work around known bugs
|
|
|
|
nativeccprofopts="$nativecccompopts"
|