Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/ocaml/4.03.0: 010_all_execstacks.patch 020_all_configure.patch 050_all_objinfoldflags.patch series
Date: Tue, 01 Mar 2016 17:21:37
Message-Id: 20160301172134.7D31616C5@oystercatcher.gentoo.org
1 aballier 16/03/01 17:21:34
2
3 Added: 010_all_execstacks.patch 020_all_configure.patch
4 050_all_objinfoldflags.patch series
5 Log:
6 add patches for ocaml 4.03
7
8 Revision Changes Path
9 1.1 src/patchsets/ocaml/4.03.0/010_all_execstacks.patch
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.03.0/010_all_execstacks.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.03.0/010_all_execstacks.patch?rev=1.1&content-type=text/plain
13
14 Index: 010_all_execstacks.patch
15 ===================================================================
16 Fix the EXEC_STACK in ocaml compiled binaries (#153382)
17
18 Index: ocaml-4.03.0+beta1/asmrun/sparc.S
19 ===================================================================
20 --- ocaml-4.03.0+beta1.orig/asmrun/sparc.S
21 +++ ocaml-4.03.0+beta1/asmrun/sparc.S
22 @@ -358,3 +358,8 @@ caml_system__frametable:
23 .type caml_raise_exception, #function
24 .type caml_system__frametable, #object
25 #endif
26 +
27 +#ifdef __ELF__
28 +.section .note.GNU-stack,"",%progbits
29 +#endif
30 +
31 Index: ocaml-4.03.0+beta1/asmcomp/sparc/emit.mlp
32 ===================================================================
33 --- ocaml-4.03.0+beta1.orig/asmcomp/sparc/emit.mlp
34 +++ ocaml-4.03.0+beta1/asmcomp/sparc/emit.mlp
35 @@ -737,6 +737,12 @@ let data l =
36 ` .data\n`;
37 List.iter emit_item l
38
39 +(* Mark stack as non executable *)
40 +let nx_stack() =
41 + if Config.system = "linux" then
42 + ` .section .note.GNU-stack,\"\",%progbits\n`
43 +
44 +
45 (* Beginning / end of an assembly file *)
46
47 let begin_assembly() =
48 @@ -750,6 +756,7 @@ let begin_assembly() =
49 `{emit_symbol lbl_begin}:\n`
50
51 let end_assembly() =
52 + nx_stack();
53 ` .text\n`;
54 let lbl_end = Compilenv.make_symbol (Some "code_end") in
55 ` .global {emit_symbol lbl_end}\n`;
56
57
58
59 1.1 src/patchsets/ocaml/4.03.0/020_all_configure.patch
60
61 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.03.0/020_all_configure.patch?rev=1.1&view=markup
62 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.03.0/020_all_configure.patch?rev=1.1&content-type=text/plain
63
64 Index: 020_all_configure.patch
65 ===================================================================
66 The configure script doesn't inherit previous defined variables,
67 overwriting previous declarations of bytecccompopts, bytecclinkopts,
68 nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267.
69
70 Index: ocaml-4.03.0+beta1/configure
71 ===================================================================
72 --- ocaml-4.03.0+beta1.orig/configure
73 +++ ocaml-4.03.0+beta1/configure
74 @@ -290,7 +290,7 @@ esac
75 # Configure the bytecode compiler
76
77 bytecc="$cc"
78 -mkexe="\$(BYTECC)"
79 +mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)"
80 mkexedebugflag="-g"
81 bytecccompopts=""
82 bytecclinkopts=""
83 @@ -1671,6 +1671,16 @@ fi
84 echo "X11_INCLUDES=$x11_include" >> Makefile
85 echo "X11_LINK=$x11_link" >> Makefile
86
87 +bytecccompopts="$CFLAGS $bytecccompopts"
88 +bytecclinkopts="$LDFLAGS $bytecclinkopts"
89 +natdynlinkopts="$LDFLAGS $natdynlinkopts"
90 +nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts"
91 +nativecclinkopts="$LDFLAGS $nativecclinkopts"
92 +nativecccompopts="$CFLAGS $nativecccompopts"
93 +nativeccprofopts="$nativecccompopts"
94 +mksharedlib="$mksharedlib $LDFLAGS"
95 +mkmaindll="$mkmaindll $LDFLAGS"
96 +
97 # Look for BFD library
98
99 if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \
100 @@ -1769,6 +1779,7 @@ echo "NATIVECC=$nativecc" >> Makefile
101 echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
102 echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
103 echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
104 +echo "NATIVECCRAWLINKOPTS=$nativeccrawlinkopts" >> Makefile
105 echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
106 echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
107 echo "ASM=$as" >> Makefile
108 @@ -1780,7 +1791,7 @@ echo "OTHERLIBRARIES=$otherlibraries" >>
109 echo "CC_PROFILE=$cc_profile" >> Makefile
110 echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
111 echo "PARTIALLD=$partialld" >> Makefile
112 -echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \
113 +echo "PACKLD=\$(PARTIALLD) \$(NATIVECCRAWLINKOPTS) -o " \
114 | sed -e 's/ $/\\ /' >> Makefile
115 echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile
116 echo "IFLEXDIR=$iflexdir" >> Makefile
117
118
119
120 1.1 src/patchsets/ocaml/4.03.0/050_all_objinfoldflags.patch
121
122 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.03.0/050_all_objinfoldflags.patch?rev=1.1&view=markup
123 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.03.0/050_all_objinfoldflags.patch?rev=1.1&content-type=text/plain
124
125 Index: 050_all_objinfoldflags.patch
126 ===================================================================
127 Index: ocaml-4.03.0+beta1/tools/Makefile.shared
128 ===================================================================
129 --- ocaml-4.03.0+beta1.orig/tools/Makefile.shared
130 +++ ocaml-4.03.0+beta1/tools/Makefile.shared
131 @@ -273,7 +273,7 @@ CCOUT = -o $(EMPTY)
132 endif
133
134 objinfo_helper$(EXE): objinfo_helper.c ../config/s.h
135 - $(BYTECC) $(CCOUT)objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
136 + $(MKEXE) $(CCOUT)objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \
137 $(DEF_SYMBOL_PREFIX) $(LIBBFD_INCLUDE) objinfo_helper.c $(LIBBFD_LINK)
138
139 OBJINFO=../compilerlibs/ocamlcommon.cma \
140
141
142
143 1.1 src/patchsets/ocaml/4.03.0/series
144
145 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.03.0/series?rev=1.1&view=markup
146 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/ocaml/4.03.0/series?rev=1.1&content-type=text/plain
147
148 Index: series
149 ===================================================================
150 010_all_execstacks.patch
151 020_all_configure.patch
152 050_all_objinfoldflags.patch