1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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=''
|