View | Details | Raw Unified | Return to bug 221901 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +5 lines)
Lines 68-74 Link Here
68
PLIST_SUB+=	DOC="@comment "
68
PLIST_SUB+=	DOC="@comment "
69
.endif
69
.endif
70
70
71
.if ${ARCH} == armv6
71
.if ${ARCH} == armv6 || ${ARCH} == armv7
72
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils
73
RUN_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils
74
AS=		${LOCALBASE}/bin/as
72
CONFIGURE_ARGS+=	-as "${AS} ${ASFLAGS} -meabi=5"
75
CONFIGURE_ARGS+=	-as "${AS} ${ASFLAGS} -meabi=5"
73
.else
76
.else
74
CONFIGURE_ARGS+=	-as "${AS} ${ASFLAGS}"
77
CONFIGURE_ARGS+=	-as "${AS} ${ASFLAGS}"
Lines 98-104 Link Here
98
.include <bsd.port.pre.mk>
101
.include <bsd.port.pre.mk>
99
.include "${FILESDIR}/manfiles"
102
.include "${FILESDIR}/manfiles"
100
103
101
OCAML_ARCH=	${ARCH:S/x86_64/amd64/:S/powerpc/power/:S/armv6/arm/}
104
OCAML_ARCH=	${ARCH:S/x86_64/amd64/:S/powerpc/power/:C/armv.*/arm/}
102
105
103
.if defined(NO_PROFILE) || ${OCAML_ARCH:Mpower} || ${OCAML_ARCH:Mamd64}
106
.if defined(NO_PROFILE) || ${OCAML_ARCH:Mpower} || ${OCAML_ARCH:Mamd64}
104
107
(-)files/patch-configure (-19 / +27 lines)
Lines 17-23 Link Here
17
+    *-*-linux-gnu|*-*-linux|*-*-dragonfly*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
17
+    *-*-linux-gnu|*-*-linux|*-*-dragonfly*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
18
       sharedcccompopts="-fPIC"
18
       sharedcccompopts="-fPIC"
19
-      mksharedlib="$bytecc -shared"
19
-      mksharedlib="$bytecc -shared"
20
+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
20
+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
21
       bytecclinkopts="$bytecclinkopts -Wl,-E"
21
       bytecclinkopts="$bytecclinkopts -Wl,-E"
22
       byteccrpath="-Wl,-rpath,"
22
       byteccrpath="-Wl,-rpath,"
23
       mksharedlibrpath="-Wl,-rpath,"
23
       mksharedlibrpath="-Wl,-rpath,"
Lines 26-32 Link Here
26
         *gcc*)
26
         *gcc*)
27
           sharedcccompopts="-fPIC"
27
           sharedcccompopts="-fPIC"
28
-          mksharedlib="$bytecc -shared"
28
-          mksharedlib="$bytecc -shared"
29
+          mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
29
+          mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
30
           byteccrpath="-Wl,-rpath,"
30
           byteccrpath="-Wl,-rpath,"
31
           mksharedlibrpath="-Wl,-rpath,"
31
           mksharedlibrpath="-Wl,-rpath,"
32
           shared_libraries_supported=true;;
32
           shared_libraries_supported=true;;
Lines 35-46 Link Here
35
           sharedcccompopts="-fPIC"
35
           sharedcccompopts="-fPIC"
36
           if sh ./solaris-ld; then
36
           if sh ./solaris-ld; then
37
-            mksharedlib="$bytecc -shared"
37
-            mksharedlib="$bytecc -shared"
38
+            mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
38
+            mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
39
             byteccrpath="-R"
39
             byteccrpath="-R"
40
             mksharedlibrpath="-R"
40
             mksharedlibrpath="-R"
41
           else
41
           else
42
-            mksharedlib="$bytecc -shared"
42
-            mksharedlib="$bytecc -shared"
43
+            mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
43
+            mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
44
             bytecclinkopts="$bytecclinkopts -Wl,-E"
44
             bytecclinkopts="$bytecclinkopts -Wl,-E"
45
             natdynlinkopts="-Wl,-E"
45
             natdynlinkopts="-Wl,-E"
46
             byteccrpath="-Wl,-rpath,"
46
             byteccrpath="-Wl,-rpath,"
Lines 49-61 Link Here
49
       shared_libraries_supported=true;;
49
       shared_libraries_supported=true;;
50
     i[3456]86-*-darwin[89].*)
50
     i[3456]86-*-darwin[89].*)
51
-      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
51
-      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
52
+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
52
+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
53
       bytecccompopts="$dl_defs $bytecccompopts"
53
       bytecccompopts="$dl_defs $bytecccompopts"
54
       dl_needs_underscore=false
54
       dl_needs_underscore=false
55
       shared_libraries_supported=true;;
55
       shared_libraries_supported=true;;
56
     *-apple-darwin*)
56
     *-apple-darwin*)
57
-      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
57
-      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
58
+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
58
+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -bundle -flat_namespace -undefined suppress -Wl,-no_compact_unwind"
59
       bytecccompopts="$dl_defs $bytecccompopts"
59
       bytecccompopts="$dl_defs $bytecccompopts"
60
       dl_needs_underscore=false
60
       dl_needs_underscore=false
61
       shared_libraries_supported=true;;
61
       shared_libraries_supported=true;;
Lines 64-70 Link Here
64
     *-*-openbsd*)
64
     *-*-openbsd*)
65
       sharedcccompopts="-fPIC"
65
       sharedcccompopts="-fPIC"
66
-      mksharedlib="$bytecc -shared"
66
-      mksharedlib="$bytecc -shared"
67
+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
67
+      mksharedlib="$bytecc $bytecclinkopts $bytecclinkopts $bytecclinkopts $bytecclinkopts -shared"
68
       bytecclinkopts="$bytecclinkopts -Wl,-E"
68
       bytecclinkopts="$bytecclinkopts -Wl,-E"
69
       natdynlinkopts="-Wl,-E"
69
       natdynlinkopts="-Wl,-E"
70
       byteccrpath="-Wl,-rpath,"
70
       byteccrpath="-Wl,-rpath,"
Lines 88-94 Link Here
88
   powerpc-*-netbsd*)            arch=power; model=ppc; system=elf;;
88
   powerpc-*-netbsd*)            arch=power; model=ppc; system=elf;;
89
   powerpc-*-openbsd*)           arch=power; model=ppc; system=bsd_elf;;
89
   powerpc-*-openbsd*)           arch=power; model=ppc; system=bsd_elf;;
90
   powerpc-*-rhapsody*)          arch=power; model=ppc; system=rhapsody;;
90
   powerpc-*-rhapsody*)          arch=power; model=ppc; system=rhapsody;;
91
@@ -862,6 +865,7 @@ case "$target" in
91
@@ -854,6 +857,7 @@ case "$target" in
92
   armv7*-*-linux-gnueabi)       arch=arm; model=armv7; system=linux_eabi;;
93
   armv6t2*-*-linux-gnueabi)     arch=arm; model=armv6t2; system=linux_eabi;;
94
   armv6*-*-linux-gnueabi)       arch=arm; model=armv6; system=linux_eabi;;
95
+  armv7*-*-freebsd*)            arch=arm; model=armv7; system=freebsd;;
96
   armv6*-*-freebsd*)            arch=arm; model=armv6; system=freebsd;;
97
   armv5te*-*-linux-gnueabi)     arch=arm; model=armv5te; system=linux_eabi;;
98
   armv5*-*-linux-gnueabi)       arch=arm; model=armv5; system=linux_eabi;;
99
@@ -862,6 +866,7 @@ case "$target" in
92
   zaurus*-*-openbsd*)           arch=arm; system=bsd;;
100
   zaurus*-*-openbsd*)           arch=arm; system=bsd;;
93
   x86_64-*-linux*)              arch=amd64; system=linux;;
101
   x86_64-*-linux*)              arch=amd64; system=linux;;
94
   x86_64-*-gnu*)                arch=amd64; system=gnu;;
102
   x86_64-*-gnu*)                arch=amd64; system=gnu;;
Lines 96-102 Link Here
96
   x86_64-*-freebsd*)            arch=amd64; system=freebsd;;
104
   x86_64-*-freebsd*)            arch=amd64; system=freebsd;;
97
   x86_64-*-netbsd*)             arch=amd64; system=netbsd;;
105
   x86_64-*-netbsd*)             arch=amd64; system=netbsd;;
98
   x86_64-*-openbsd*)            arch=amd64; system=openbsd;;
106
   x86_64-*-openbsd*)            arch=amd64; system=openbsd;;
99
@@ -889,7 +893,7 @@ else
107
@@ -889,7 +894,7 @@ else
100
 fi
108
 fi
101
 
109
 
102
 nativecccompopts=''
110
 nativecccompopts=''
Lines 105-111 Link Here
105
 # FIXME the naming of nativecclinkopts is broken: these are options for
113
 # FIXME the naming of nativecclinkopts is broken: these are options for
106
 # ld (for shared libs), not for cc
114
 # ld (for shared libs), not for cc
107
 nativeccrpath="$byteccrpath"
115
 nativeccrpath="$byteccrpath"
108
@@ -932,6 +936,8 @@ case "$arch,$system" in
116
@@ -932,6 +937,8 @@ case "$arch,$system" in
109
                   esac;;
117
                   esac;;
110
   arm,freebsd)    as="${TOOLPREF}cc -c"
118
   arm,freebsd)    as="${TOOLPREF}cc -c"
111
                   aspp="${TOOLPREF}cc -c";;
119
                   aspp="${TOOLPREF}cc -c";;
Lines 114-120 Link Here
114
   *,freebsd)      as="${TOOLPREF}as"
122
   *,freebsd)      as="${TOOLPREF}as"
115
                   aspp="${TOOLPREF}cc -c";;
123
                   aspp="${TOOLPREF}cc -c";;
116
   amd64,*|arm,*|arm64,*|i386,*|power,bsd*|sparc,*)
124
   amd64,*|arm,*|arm64,*|i386,*|power,bsd*|sparc,*)
117
@@ -955,9 +961,11 @@ case "$arch,$system" in
125
@@ -955,9 +962,11 @@ case "$arch,$system" in
118
     case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
126
     case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
119
   amd64,linux) profiling='prof';;
127
   amd64,linux) profiling='prof';;
120
   amd64,openbsd) profiling='prof';;
128
   amd64,openbsd) profiling='prof';;
Lines 126-132 Link Here
126
   arm,linux*) profiling='prof';;
134
   arm,linux*) profiling='prof';;
127
   power,elf) profiling='prof';;
135
   power,elf) profiling='prof';;
128
   power,bsd*) profiling='prof';;
136
   power,bsd*) profiling='prof';;
129
@@ -1415,6 +1423,8 @@ if test "$pthread_wanted" = "yes"; then
137
@@ -1415,6 +1424,8 @@ if test "$pthread_wanted" = "yes"; then
130
   case "$target" in
138
   case "$target" in
131
     *-*-solaris*)  pthread_link="-lpthread -lposix4"
139
     *-*-solaris*)  pthread_link="-lpthread -lposix4"
132
                    pthread_caml_link="-cclib -lpthread -cclib -lposix4";;
140
                    pthread_caml_link="-cclib -lpthread -cclib -lposix4";;
Lines 135-141 Link Here
135
     *-*-freebsd*)  pthread_link="-pthread"
143
     *-*-freebsd*)  pthread_link="-pthread"
136
                    pthread_caml_link="-cclib -pthread";;
144
                    pthread_caml_link="-cclib -pthread";;
137
     *-*-openbsd*)  pthread_link="-pthread"
145
     *-*-openbsd*)  pthread_link="-pthread"
138
@@ -1431,7 +1441,7 @@ if test "$pthread_wanted" = "yes"; then
146
@@ -1431,7 +1442,7 @@ if test "$pthread_wanted" = "yes"; then
139
     bytecccompopts="$bytecccompopts -D_REENTRANT"
147
     bytecccompopts="$bytecccompopts -D_REENTRANT"
140
     nativecccompopts="$nativecccompopts -D_REENTRANT"
148
     nativecccompopts="$nativecccompopts -D_REENTRANT"
141
     case "$target" in
149
     case "$target" in
Lines 144-150 Link Here
144
           bytecccompopts="$bytecccompopts -D_THREAD_SAFE"
152
           bytecccompopts="$bytecccompopts -D_THREAD_SAFE"
145
           nativecccompopts="$nativecccompopts -D_THREAD_SAFE";;
153
           nativecccompopts="$nativecccompopts -D_THREAD_SAFE";;
146
       *-*-openbsd*)
154
       *-*-openbsd*)
147
@@ -1601,6 +1611,7 @@ if test "$x11_include" = "not found"; th
155
@@ -1601,6 +1612,7 @@ if test "$x11_include" = "not found"; then
148
       else
156
       else
149
         x11_libs="-L$dir"
157
         x11_libs="-L$dir"
150
         case "$target" in
158
         case "$target" in
Lines 152-158 Link Here
152
           *-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
160
           *-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
153
           *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
161
           *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
154
           *) x11_link="-L$dir -lX11";;
162
           *) x11_link="-L$dir -lX11";;
155
@@ -1644,10 +1655,10 @@ echo "X11_LINK=$x11_link" >> Makefile
163
@@ -1644,10 +1656,10 @@ echo "X11_LINK=$x11_link" >> Makefile
156
 # Look for BFD library
164
 # Look for BFD library
157
 
165
 
158
 if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \
166
 if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \
Lines 165-180 Link Here
165
 else
173
 else
166
   wrn "BFD library not found, 'objinfo' will be unable to display info on .cmxs files."
174
   wrn "BFD library not found, 'objinfo' will be unable to display info on .cmxs files."
167
   echo "LIBBFD_LINK=" >> Makefile
175
   echo "LIBBFD_LINK=" >> Makefile
168
@@ -1686,12 +1697,6 @@ if $no_naked_pointers; then
176
@@ -1685,12 +1697,6 @@ fi
177
 if $no_naked_pointers; then
169
   echo "#define NO_NAKED_POINTERS" >> m.h
178
   echo "#define NO_NAKED_POINTERS" >> m.h
170
 fi
179
 fi
171
 
180
-
172
-# Add Unix-style optimization flag
181
-# Add Unix-style optimization flag
173
-bytecccompopts="-O $bytecccompopts"
182
-bytecccompopts="-O $bytecccompopts"
174
-dllcccompopts="-O $dllcccompopts"
183
-dllcccompopts="-O $dllcccompopts"
175
-nativecccompopts="-O $nativecccompopts"
184
-nativecccompopts="-O $nativecccompopts"
176
-sharedcccompopts="-O $sharedcccompopts"
185
-sharedcccompopts="-O $sharedcccompopts"
177
-
186
 
178
 # Final twiddling of compiler options to work around known bugs
187
 # Final twiddling of compiler options to work around known bugs
179
 
188
 
180
 nativeccprofopts="$nativecccompopts"

Return to bug 221901