diff options
Diffstat (limited to 'dev-lang/ocaml/files/ocaml-3.10.0-configure.patch')
-rw-r--r-- | dev-lang/ocaml/files/ocaml-3.10.0-configure.patch | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/dev-lang/ocaml/files/ocaml-3.10.0-configure.patch b/dev-lang/ocaml/files/ocaml-3.10.0-configure.patch new file mode 100644 index 000000000000..d96d3f5beed1 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-3.10.0-configure.patch @@ -0,0 +1,133 @@ +Index: ocaml-3.10.0/configure +=================================================================== +--- ocaml-3.10.0.orig/configure ++++ ocaml-3.10.0/configure +@@ -233,75 +233,75 @@ esac + # Configure the bytecode compiler + + bytecc="$cc" +-bytecccompopts="" +-bytecclinkopts="" ++bytecccompopts="${CFLAGS}" ++bytecclinkopts="${LDFLAGS}" + ostype="Unix" + exe="" + + case "$bytecc,$host" in + cc,*-*-nextstep*) + # GNU C extensions disabled, but __GNUC__ still defined! +- bytecccompopts="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix" +- bytecclinkopts="-posix";; ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -U__GNUC__ -posix" ++ bytecclinkopts="$bytecclinkopts -posix";; + *,*-*-rhapsody*) + # Almost the same as NeXTStep +- bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -DSHRINKED_GNUC" + mathlib="";; + *,*-*-darwin*) +- bytecccompopts="-fno-defer-pop -no-cpp-precomp $gcc_warnings" ++ bytecccompopts="$bytecccompopts -fno-defer-pop -no-cpp-precomp $gcc_warnings" + mathlib="" + # Tell gcc that we can use 32-bit code addresses for threaded code + # even if we compile in 64-bit mode + echo "#define ARCH_CODE32" >> m.h;; + *,*-*-beos*) +- bytecccompopts="-fno-defer-pop $gcc_warnings" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings" + # No -lm library + mathlib="";; + gcc,alpha*-*-osf*) +- bytecccompopts="-fno-defer-pop $gcc_warnings" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings" + if cc="$bytecc" sh ./hasgot -mieee; then + bytecccompopts="-mieee $bytecccompopts"; + fi + # Put code and static data in lower 4GB +- bytecclinkopts="-Wl,-T,12000000 -Wl,-D,14000000" ++ bytecclinkopts="$bytecclinkopts -Wl,-T,12000000 -Wl,-D,14000000" + # Tell gcc that we can use 32-bit code addresses for threaded code + echo "#define ARCH_CODE32" >> m.h;; + cc,alpha*-*-osf*) +- bytecccompopts="-std1 -ieee";; ++ bytecccompopts="$bytecccompopts -std1 -ieee";; + gcc,alpha*-*-linux*) + if cc="$bytecc" sh ./hasgot -mieee; then + bytecccompopts="-mieee $bytecccompopts"; + fi;; + cc,mips-*-irix6*) + # Add -n32 flag to ensure compatibility with native-code compiler +- bytecccompopts="-n32" ++ bytecccompopts="$bytecccompopts -n32" + # Turn off warning "unused library" +- bytecclinkopts="-n32 -Wl,-woff,84";; ++ bytecclinkopts="$bytecclinkopts -n32 -Wl,-woff,84";; + cc*,mips-*-irix6*) + # (For those who want to force "cc -64") + # Turn off warning "unused library" +- bytecclinkopts="-Wl,-woff,84";; ++ bytecclinkopts="$bytecclinkopts -Wl,-woff,84";; + *,alpha*-*-unicos*) + # For the Cray T3E +- bytecccompopts="-DUMK";; ++ bytecccompopts="$bytecccompopts -DUMK";; + gcc*,powerpc-*-aix*) + # Avoid name-space pollution by requiring Unix98-conformant includes +- bytecccompopts="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";; ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";; + *,powerpc-*-aix*) +- bytecccompopts="-D_XOPEN_SOURCE=500";; ++ bytecccompopts="$bytecccompopts -D_XOPEN_SOURCE=500";; + gcc*,*-*-cygwin*) +- bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings -U_WIN32" + exe=".exe" + ostype="Cygwin";; + gcc*,x86_64-*-linux*) +- bytecccompopts="-fno-defer-pop $gcc_warnings" ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings" + # Tell gcc that we can use 32-bit code addresses for threaded code + # unless we are compiled for a shared library (-fPIC option) + echo "#ifndef __PIC__" >> m.h + echo "# define ARCH_CODE32" >> m.h + echo "#endif" >> m.h;; + gcc*) +- bytecccompopts="-fno-defer-pop $gcc_warnings";; ++ bytecccompopts="$bytecccompopts -fno-defer-pop $gcc_warnings";; + esac + + # Configure compiler to use in further tests +@@ -616,22 +616,22 @@ else + nativecc="$ccoption" + fi + +-nativecccompopts='' +-nativecclinkopts='' ++nativecccompopts="${CFLAGS}" ++nativecclinkopts="${LDFLAGS}" + nativeccrpath="$byteccrpath" + + case "$arch,$nativecc,$system,$host_type" in +- alpha,cc*,digital,*) nativecccompopts=-std1;; +- mips,cc*,irix,*) nativecccompopts=-n32 +- nativecclinkopts="-n32 -Wl,-woff,84";; +- *,*,nextstep,*) nativecccompopts="$gcc_warnings -U__GNUC__ -posix" +- nativecclinkopts="-posix";; ++ alpha,cc*,digital,*) nativecccompopts="$nativecccompopts -std1";; ++ mips,cc*,irix,*) nativecccompopts="$nativecccompopts -n32" ++ nativecclinkopts="$nativecclinkopts -n32 -Wl,-woff,84";; ++ *,*,nextstep,*) nativecccompopts="$nativecccompopts $gcc_warnings -U__GNUC__ -posix" ++ nativecclinkopts="$nativecclinkopts -posix";; + *,*,rhapsody,*darwin[1-5].*) +- nativecccompopts="$gcc_warnings -DSHRINKED_GNUC";; +- *,*,rhapsody,*) nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs" ++ nativecccompopts="$nativecccompopts $gcc_warnings -DSHRINKED_GNUC";; ++ *,*,rhapsody,*) nativecccompopts="$nativecccompopts $gcc_warnings -DDARWIN_VERSION_6 $dl_defs" + if $arch64; then partialld="ld -r -arch ppc64"; fi;; +- *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";; +- *,gcc*,*,*) nativecccompopts="$gcc_warnings";; ++ *,gcc*,cygwin,*) nativecccompopts="$nativecccompopts $gcc_warnings -U_WIN32";; ++ *,gcc*,*,*) nativecccompopts="$nativecccompopts $gcc_warnings";; + esac + + asflags='' |