lang/gcc5-aux: Upgrade version 20150422 => 20160603 (GCC 5.1 => 5.4) The signal trampoline detection for NetBSD 7 and later is still broken. Support for NetBSD 6.99 has been removed along with supporte for 32-bit DragonFly. The modifications to the testsuite were misguided and have also been removed.diff -r1.2 -r1.3 pkgsrc/lang/gcc5-aux/Makefile
(marino)
@@ -1,71 +1,68 @@ | @@ -1,71 +1,68 @@ | |||
1 | # $NetBSD: Makefile,v 1.2 2015/06/15 17:14:27 marino Exp $ | 1 | # $NetBSD: Makefile,v 1.3 2016/08/28 17:59:36 marino Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | PKGNAME= gcc5-aux-${SNAPSHOT} | 4 | PKGNAME= gcc5-aux-${SNAPSHOT} | |
5 | PKGREVISION= ${MAIN_PR} | 5 | PKGREVISION= ${MAIN_PR} | |
6 | DISTNAME= ${IDENTIFICATION} | 6 | DISTNAME= ${IDENTIFICATION} | |
7 | CATEGORIES= lang | 7 | CATEGORIES= lang | |
8 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/${IDENTIFICATION}/} | 8 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/${IDENTIFICATION}/} | |
9 | DISTFILES= ${DISTNAME}.tar.bz2 | 9 | DISTFILES= ${DISTNAME}.tar.bz2 | |
10 | 10 | |||
11 | MAINTAINER= draco@marino.st | 11 | MAINTAINER= draco@marino.st | |
12 | HOMEPAGE= http://www.dragonlace.net/ | 12 | HOMEPAGE= http://www.dragonlace.net/ | |
13 | COMMENT= GNAT Ada compiler based on GCC ${GCC_BRANCH} | 13 | COMMENT= GNAT Ada compiler based on GCC ${GCC_BRANCH} | |
14 | LICENSE= gnu-gpl-v3 AND gnu-lgpl-v3 | 14 | LICENSE= gnu-gpl-v3 AND gnu-lgpl-v3 | |
15 | 15 | |||
16 | LANGS= c ada c++ | 16 | LANGS= c ada c++ | |
17 | USE_TOOLS+= gmake sed:run perl makeinfo bzip2 patch pod2man tar | 17 | USE_TOOLS+= gmake sed:run perl makeinfo bzip2 patch pod2man tar | |
18 | APPLY_DIFFS= core ada cxx | 18 | APPLY_DIFFS= core ada cxx | |
19 | 19 | |||
20 | .include "Makefile.version" | 20 | .include "Makefile.version" | |
21 | .include "Makefile.testsuite" | |||
22 | .include "../../mk/bsd.prefs.mk" | 21 | .include "../../mk/bsd.prefs.mk" | |
23 | .include "options.mk" | 22 | .include "options.mk" | |
24 | 23 | |||
25 | # Requires bootstrap compiler, which is only available for on selected systems | 24 | # Requires bootstrap compiler, which is only available for on selected systems | |
26 | # Disable SunOS for now until multilib version can be built and tested. | 25 | # Disable SunOS for now until multilib version can be built and tested. | |
27 | 26 | |||
28 | ONLY_FOR_PLATFORM= DragonFly-*-x86_64 \ | 27 | ONLY_FOR_PLATFORM= DragonFly-*-x86_64 \ | |
29 | FreeBSD-*-i386 \ | 28 | FreeBSD-*-i386 \ | |
30 | FreeBSD-*-x86_64 \ | 29 | FreeBSD-*-x86_64 \ | |
31 | NetBSD-[5-9]*-i386 \ | 30 | NetBSD-[5-9]*-i386 \ | |
32 | NetBSD-[5-9]*-x86_64 \ | 31 | NetBSD-[5-9]*-x86_64 \ | |
33 | SunOS-5.1[1-9]*-i386 \ | 32 | SunOS-5.1[1-9]*-i386 \ | |
34 | SunOS-5.1[1-9]*-x86_64 | 33 | SunOS-5.1[1-9]*-x86_64 | |
35 | 34 | |||
36 | GARCH= ${MACHINE_ARCH:S/amd64/x86_64/} | 35 | GARCH= ${MACHINE_ARCH:S/amd64/x86_64/} | |
37 | BLD_TARGET= ${GARCH}-aux-${LOWER_OPSYS}${OS_VERSION} | 36 | BLD_TARGET= ${GARCH}-aux-${LOWER_OPSYS}${OS_VERSION} | |
38 | OS_LABEL4VERS= [${OPSYS}${GARCH:M*64:S/amd_//:S/x86_//}] | 37 | OS_LABEL4VERS= [${OPSYS}${GARCH:M*64:S/amd_//:S/x86_//}] | |
39 | FULL_GNATGCC= NOT SET | 38 | FULL_GNATGCC= NOT SET | |
40 | FULL_PATH= /sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/gcc-aux/bin:${PREFIX}/sbin:${PREFIX}/bin | 39 | FULL_PATH= /sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/gcc-aux/bin:${PREFIX}/sbin:${PREFIX}/bin | |
41 | 40 | |||
42 | .if ${OPSYS} == DragonFly | 41 | .if ${OPSYS} == DragonFly | |
43 | BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.dragonfly.36A.tar.bz2 | 42 | BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.dragonfly.41.tar.bz2 | |
44 | .endif | 43 | .endif | |
45 | 44 | |||
46 | .if ${OPSYS} == FreeBSD | 45 | .if ${OPSYS} == FreeBSD | |
47 | MODERN_BINUTILS= yes | 46 | MODERN_BINUTILS= yes | |
48 | . if !empty(OS_VERSION:M[678].*) | 47 | . if !empty(OS_VERSION:M[678].*) | |
49 | BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.freebsd.84.tar.bz2 | 48 | BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.freebsd.84.tar.bz2 | |
50 | . else | 49 | . else | |
51 | BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.freebsd.100B.tar.bz2 | 50 | BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.freebsd.100B.tar.bz2 | |
52 | . endif | 51 | . endif | |
53 | .endif | 52 | .endif | |
54 | 53 | |||
55 | .if ${OPSYS} == NetBSD | 54 | .if ${OPSYS} == NetBSD | |
56 | . if !empty(OS_VERSION:M6.99.*) | 55 | . if !empty(OS_VERSION:M7.99.*) | |
57 | NSUFF= 7.0_DEV | |||
58 | . elif !empty(OS_VERSION:M7.99.*) | |||
59 | NSUFF= 8.0_DEV | 56 | NSUFF= 8.0_DEV | |
60 | . else | 57 | . else | |
61 | NSUFF= ${OS_VERSION} | 58 | NSUFF= ${OS_VERSION} | |
62 | . endif | 59 | . endif | |
63 | . if ${GARCH} == i386 | 60 | . if ${GARCH} == i386 | |
64 | NELF= elf | 61 | NELF= elf | |
65 | . endif | 62 | . endif | |
66 | XLDF= -lm | 63 | XLDF= -lm | |
67 | . if ${OS_VERSION:R} < 7 | 64 | . if ${OS_VERSION:R} < 7 | |
68 | MODERN_BINUTILS= yes | 65 | MODERN_BINUTILS= yes | |
69 | . endif | 66 | . endif | |
70 | BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.netbsd.614.tar.bz2 | 67 | BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.netbsd.614.tar.bz2 | |
71 | BLD_TARGET= ${MACHINE_ARCH}-aux-netbsd${NELF}${NSUFF} | 68 | BLD_TARGET= ${MACHINE_ARCH}-aux-netbsd${NELF}${NSUFF} | |
@@ -152,31 +149,30 @@ FULL_GNATGXX=${BOOTSTRAP_PREFIX}/bin/g++ | @@ -152,31 +149,30 @@ FULL_GNATGXX=${BOOTSTRAP_PREFIX}/bin/g++ | |||
152 | . endif | 149 | . endif | |
153 | DISTFILES+= ${BOOTSTRAP_COMPILER} | 150 | DISTFILES+= ${BOOTSTRAP_COMPILER} | |
154 | SITES.${BOOTSTRAP_COMPILER}= http://downloads.dragonlace.net/src/ | 151 | SITES.${BOOTSTRAP_COMPILER}= http://downloads.dragonlace.net/src/ | |
155 | FULL_PATH=${BOOTSTRAP_PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/sbin:${PREFIX}/bin | 152 | FULL_PATH=${BOOTSTRAP_PREFIX}/bin:/sbin:/bin:/usr/sbin:/usr/bin:${PREFIX}/sbin:${PREFIX}/bin | |
156 | .endif | 153 | .endif | |
157 | 154 | |||
158 | 155 | |||
159 | # for port maintenance, invoke "make mdi PLUS_BOOTSTRAPS=1" | 156 | # for port maintenance, invoke "make mdi PLUS_BOOTSTRAPS=1" | |
160 | .if defined(PLUS_BOOTSTRAPS) | 157 | .if defined(PLUS_BOOTSTRAPS) | |
161 | MASTER_SITES= http://downloads.dragonlace.net/src/ \ | 158 | MASTER_SITES= http://downloads.dragonlace.net/src/ \ | |
162 | ${MASTER_SITE_GNU:=gcc/${IDENTIFICATION}/} | 159 | ${MASTER_SITE_GNU:=gcc/${IDENTIFICATION}/} | |
163 | DISTFILES= \ | 160 | DISTFILES= \ | |
164 | ${DISTNAME}.tar.bz2 \ | 161 | ${DISTNAME}.tar.bz2 \ | |
165 | ada-bootstrap.i386.dragonfly.36A.tar.bz2 \ | |||
166 | ada-bootstrap.i386.freebsd.84.tar.bz2 \ | 162 | ada-bootstrap.i386.freebsd.84.tar.bz2 \ | |
167 | ada-bootstrap.i386.freebsd.100B.tar.bz2 \ | 163 | ada-bootstrap.i386.freebsd.100B.tar.bz2 \ | |
168 | ada-bootstrap.i386.netbsd.614.tar.bz2 \ | 164 | ada-bootstrap.i386.netbsd.614.tar.bz2 \ | |
169 | ada-bootstrap.x86_64.dragonfly.36A.tar.bz2 \ | 165 | ada-bootstrap.x86_64.dragonfly.41.tar.bz2 \ | |
170 | ada-bootstrap.x86_64.freebsd.84.tar.bz2 \ | 166 | ada-bootstrap.x86_64.freebsd.84.tar.bz2 \ | |
171 | ada-bootstrap.x86_64.freebsd.100B.tar.bz2 \ | 167 | ada-bootstrap.x86_64.freebsd.100B.tar.bz2 \ | |
172 | ada-bootstrap.x86_64.netbsd.614.tar.bz2 \ | 168 | ada-bootstrap.x86_64.netbsd.614.tar.bz2 \ | |
173 | ada-bootstrap.x86_64.solaris.511.tar.bz2 | 169 | ada-bootstrap.x86_64.solaris.511.tar.bz2 | |
174 | .endif | 170 | .endif | |
175 | 171 | |||
176 | # establish ada-aware compiler for use | 172 | # establish ada-aware compiler for use | |
177 | MY_CONFIGURE_ENV+= CC=${FULL_GNATGCC:Q} | 173 | MY_CONFIGURE_ENV+= CC=${FULL_GNATGCC:Q} | |
178 | MY_CONFIGURE_ENV+= CXX=${FULL_GNATGXX:Q} | 174 | MY_CONFIGURE_ENV+= CXX=${FULL_GNATGXX:Q} | |
179 | MY_CONFIGURE_ENV+= PATH=${FULL_PATH} | 175 | MY_CONFIGURE_ENV+= PATH=${FULL_PATH} | |
180 | MY_CONFIGURE_ENV+= LDFLAGS="${XLDF} ${COMPILER_RPATH_FLAG}${PREFIX}/lib" | 176 | MY_CONFIGURE_ENV+= LDFLAGS="${XLDF} ${COMPILER_RPATH_FLAG}${PREFIX}/lib" | |
181 | MY_MAKE_ENV+= PATH=${FULL_PATH} | 177 | MY_MAKE_ENV+= PATH=${FULL_PATH} | |
182 | MY_MAKE_ENV+= LD_LIBRARY_PATH=${BUILDDIR}/gcc${EXTRA_LLP} | 178 | MY_MAKE_ENV+= LD_LIBRARY_PATH=${BUILDDIR}/gcc${EXTRA_LLP} | |
@@ -204,34 +200,26 @@ CONFIGURE_ARGS+= ${EXTRA_CONFARGS} | @@ -204,34 +200,26 @@ CONFIGURE_ARGS+= ${EXTRA_CONFARGS} | |||
204 | GENERATE_PLIST= cd ${DESTDIR}${PREFIX}; | 200 | GENERATE_PLIST= cd ${DESTDIR}${PREFIX}; | |
205 | GENERATE_PLIST+= ${FIND} * \( -type f -or -type l \) | ${SORT} -dr; | 201 | GENERATE_PLIST+= ${FIND} * \( -type f -or -type l \) | ${SORT} -dr; | |
206 | 202 | |||
207 | 203 | |||
208 | post-extract: | 204 | post-extract: | |
209 | # Personalize GNAT for each different machine | 205 | # Personalize GNAT for each different machine | |
210 | @${ECHO} "-=> GCC AUX ${OS_LABEL4VERS}" > ${REVFILE} | 206 | @${ECHO} "-=> GCC AUX ${OS_LABEL4VERS}" > ${REVFILE} | |
211 | @${ECHO} ${PHASE} > ${PHASEFILE} | 207 | @${ECHO} ${PHASE} > ${PHASEFILE} | |
212 | # Apply required composite diff files | 208 | # Apply required composite diff files | |
213 | .for suffix in ${APPLY_DIFFS} | 209 | .for suffix in ${APPLY_DIFFS} | |
214 | @${ECHO} "Applying composite patch diff-${suffix}" | 210 | @${ECHO} "Applying composite patch diff-${suffix}" | |
215 | ${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix} | 211 | ${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix} | |
216 | .endfor | 212 | .endfor | |
217 | (cd ${WRKSRC}/libstdc++-v3/testsuite/22_locale && ${PERL5} -i \ | |||
218 | -pe 's|ISO-8859|ISO8859|g;' \ | |||
219 | -pe 's|ja_JP.eucjp|ja_JP.eucJP|g;' \ | |||
220 | -pe 's|en_HK|zh_HK|g;' \ | |||
221 | -pe 's|en_PH|en_NZ|g;' \ | |||
222 | -pe 's|se_NO|no_NO|g;' \ | |||
223 | -pe 's|es_MX|es_ES|g;' \ | |||
224 | -pe 's|ru_RU.UTF8|ru_RU.UTF-8|g' ${LOCALE22FIX}) | |||
225 | .if ${OPSYS} == NetBSD | 213 | .if ${OPSYS} == NetBSD | |
226 | . for sysfile in ${CORRECTIONS} | 214 | . for sysfile in ${CORRECTIONS} | |
227 | . for pair in ${${CRXN}_${sysfile}} | 215 | . for pair in ${${CRXN}_${sysfile}} | |
228 | ${PERL5} -pi -e 's|C, ${pair:H}, ".*"|C, ${pair:H}, "${pair:T}"|' \ | 216 | ${PERL5} -pi -e 's|C, ${pair:H}, ".*"|C, ${pair:H}, "${pair:T}"|' \ | |
229 | ${WRKSRC}/gcc/ada/${sysfile} | 217 | ${WRKSRC}/gcc/ada/${sysfile} | |
230 | . endfor | 218 | . endfor | |
231 | . endfor | 219 | . endfor | |
232 | . if ${CRXN} == C5 | 220 | . if ${CRXN} == C5 | |
233 | ${PERL5} -pi -e 's|new int64_t|new int|' \ | 221 | ${PERL5} -pi -e 's|new int64_t|new int|' \ | |
234 | ${WRKSRC}/gcc/ada/s-osinte-netbsd.ads | 222 | ${WRKSRC}/gcc/ada/s-osinte-netbsd.ads | |
235 | ${PERL5} -pi -e 's|new Long_Integer|new Integer|' \ | 223 | ${PERL5} -pi -e 's|new Long_Integer|new Integer|' \ | |
236 | ${WRKSRC}/gcc/ada/s-osprim-posix.adb | 224 | ${WRKSRC}/gcc/ada/s-osprim-posix.adb | |
237 | . endif | 225 | . endif |
@@ -1,21 +1,21 @@ | @@ -1,21 +1,21 @@ | |||
1 | # $NetBSD: Makefile.version,v 1.2 2015/06/15 17:14:27 marino Exp $ | 1 | # $NetBSD: Makefile.version,v 1.3 2016/08/28 17:59:36 marino Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | SNAPSHOT= 20150422 | 4 | SNAPSHOT= 20160603 | |
5 | GCC_BRANCH= 5 | 5 | GCC_BRANCH= 5 | |
6 | GCC_POINT= 1.0 | 6 | GCC_POINT= 4.0 | |
7 | GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT} | 7 | GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT} | |
8 | BUILD_RELEASE= yes | 8 | BUILD_RELEASE= yes | |
9 | MAIN_PR= 1 | 9 | MAIN_PR= 0 | |
10 | 10 | |||
11 | .if ${BUILD_RELEASE:Mno} | 11 | .if ${BUILD_RELEASE:Mno} | |
12 | # Snapshot naming pattern | 12 | # Snapshot naming pattern | |
13 | IDENTIFICATION= gcc-${GCC_BRANCH}-${SNAPSHOT} | 13 | IDENTIFICATION= gcc-${GCC_BRANCH}-${SNAPSHOT} | |
14 | MS_SUBDIR= snapshots/${GCC_BRANCH}-${SNAPSHOT} | 14 | MS_SUBDIR= snapshots/${GCC_BRANCH}-${SNAPSHOT} | |
15 | PHASE= snapshot | 15 | PHASE= snapshot | |
16 | .else | 16 | .else | |
17 | # Release naming pattern | 17 | # Release naming pattern | |
18 | IDENTIFICATION= gcc-${GCC_VERSION} | 18 | IDENTIFICATION= gcc-${GCC_VERSION} | |
19 | MS_SUBDIR= releases/gcc-${GCC_VERSION} | 19 | MS_SUBDIR= releases/gcc-${GCC_VERSION} | |
20 | PHASE= release | 20 | PHASE= release | |
21 | .endif | 21 | .endif |
@@ -1,32 +1,38 @@ | @@ -1,32 +1,38 @@ | |||
1 | $NetBSD: distinfo,v 1.1 2015/06/15 09:46:27 marino Exp $ | 1 | $NetBSD: distinfo,v 1.2 2016/08/28 17:59:36 marino Exp $ | |
2 | 2 | |||
3 | SHA1 (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 7e0725889ae752e6a9fdbac5b1d2ef0e3f62822e | |||
4 | RMD160 (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = f62c00515588804ce69368507822f30380d7e48d | |||
5 | Size (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 39357314 bytes | |||
6 | SHA1 (ada-bootstrap.i386.freebsd.100B.tar.bz2) = b7ff322bbcfa403d37d917d6e88e306de0857251 | 3 | SHA1 (ada-bootstrap.i386.freebsd.100B.tar.bz2) = b7ff322bbcfa403d37d917d6e88e306de0857251 | |
7 | RMD160 (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 7a85e0f073dafe9b0d37b493dbb4268bd2f39601 | 4 | RMD160 (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 7a85e0f073dafe9b0d37b493dbb4268bd2f39601 | |
5 | SHA512 (ada-bootstrap.i386.freebsd.100B.tar.bz2) = ab4a32457f5febf2c854b7107abb8159754f5a5e8413598fb2ecf1ed0a755129c26aab0e0c2e09695d02cef5490b53a3b18c9fa37cec0b07476940c27fc76ae8 | |||
8 | Size (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 41229192 bytes | 6 | Size (ada-bootstrap.i386.freebsd.100B.tar.bz2) = 41229192 bytes | |
9 | SHA1 (ada-bootstrap.i386.freebsd.84.tar.bz2) = 54c3d59fd2ca75bb91255296bc0f9d6028ac2cd2 | 7 | SHA1 (ada-bootstrap.i386.freebsd.84.tar.bz2) = 54c3d59fd2ca75bb91255296bc0f9d6028ac2cd2 | |
10 | RMD160 (ada-bootstrap.i386.freebsd.84.tar.bz2) = 8ceb3957708eb9ccc8ce2ff1ea26949683ee2fa7 | 8 | RMD160 (ada-bootstrap.i386.freebsd.84.tar.bz2) = 8ceb3957708eb9ccc8ce2ff1ea26949683ee2fa7 | |
9 | SHA512 (ada-bootstrap.i386.freebsd.84.tar.bz2) = de193d7f501538204b4c3159e3df33c2c3e9c9ffbe6ccd67d2aec2c77243e91b217ea7c05b202fe513d43c751ca7fcb002f47e3156d05436302e2038b4c4e5ae | |||
11 | Size (ada-bootstrap.i386.freebsd.84.tar.bz2) = 39727003 bytes | 10 | Size (ada-bootstrap.i386.freebsd.84.tar.bz2) = 39727003 bytes | |
12 | SHA1 (ada-bootstrap.i386.netbsd.614.tar.bz2) = 2c29209b086dcf3076428f232fadf306b9a227c6 | 11 | SHA1 (ada-bootstrap.i386.netbsd.614.tar.bz2) = 2c29209b086dcf3076428f232fadf306b9a227c6 | |
13 | RMD160 (ada-bootstrap.i386.netbsd.614.tar.bz2) = f0ecb9b0d69c2d097c6405e0db581f606b372017 | 12 | RMD160 (ada-bootstrap.i386.netbsd.614.tar.bz2) = f0ecb9b0d69c2d097c6405e0db581f606b372017 | |
13 | SHA512 (ada-bootstrap.i386.netbsd.614.tar.bz2) = 39d0b2503e9e3a0c9aa25c2daa83be4109e9bda41076c2ea5eb4abf89137c6c2ad6b6726a6d634c8f89f4695810ba902920444df29c5cba31942f84a69aeee75 | |||
14 | Size (ada-bootstrap.i386.netbsd.614.tar.bz2) = 37900035 bytes | 14 | Size (ada-bootstrap.i386.netbsd.614.tar.bz2) = 37900035 bytes | |
15 | SHA1 (ada-bootstrap.x86_64.dragonfly.36A.tar.bz2) = 85ceea8d0bd0d1b8c1f91ea6d7ffb2ffe4a4c7da | 15 | SHA1 (ada-bootstrap.x86_64.dragonfly.41.tar.bz2) = 95fdb86cff798ca7ddb7ac5f9dc397cd1f73e9c4 | |
16 | RMD160 (ada-bootstrap.x86_64.dragonfly.36A.tar.bz2) = 7ca8ccff5a4400a7e4fc9ad1d11c64f3c92d54f4 | 16 | RMD160 (ada-bootstrap.x86_64.dragonfly.41.tar.bz2) = 54b56708e6f944ca5e40eb2d99cf79b3487abdb2 | |
17 | Size (ada-bootstrap.x86_64.dragonfly.36A.tar.bz2) = 40747242 bytes | 17 | SHA512 (ada-bootstrap.x86_64.dragonfly.41.tar.bz2) = 9a3244b5f76104f1ffcd6e4c47f222f8be7b1faf7184e2e265b1a349e587f4d5112271e91a619e665b893e6a7a58ac0a3e07129f8cff7a473e66229718cff2d2 | |
18 | Size (ada-bootstrap.x86_64.dragonfly.41.tar.bz2) = 44956630 bytes | |||
18 | SHA1 (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = edfe60c5f42bbeb145d7070ed868135ebc60c2de | 19 | SHA1 (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = edfe60c5f42bbeb145d7070ed868135ebc60c2de | |
19 | RMD160 (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 0d50885402208caafbc133ffc3b8684e89a50cae | 20 | RMD160 (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 0d50885402208caafbc133ffc3b8684e89a50cae | |
21 | SHA512 (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 07e7503f575c6ba30c5d4db1f9781f522c0b48effb62c90fe3af991ebbada8064d035871e0e99206c86eb4c10fdfffb6faf89bc203370797d9c1818657004f1a | |||
20 | Size (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 42163803 bytes | 22 | Size (ada-bootstrap.x86_64.freebsd.100B.tar.bz2) = 42163803 bytes | |
21 | SHA1 (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = b5c76ce07df6e944742eda5f860352c8e179b988 | 23 | SHA1 (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = b5c76ce07df6e944742eda5f860352c8e179b988 | |
22 | RMD160 (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = 334c2375ee35bdf931a3a476e794e494ff252515 | 24 | RMD160 (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = 334c2375ee35bdf931a3a476e794e494ff252515 | |
25 | SHA512 (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = f7edc4b4d9adcf071cb74221119ae5989f39af176c988f9c446b7b302247f7263215724f5826cf27854f0b87a23f2756ce703e6e1519997faa48a157c0c1425e | |||
23 | Size (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = 40227668 bytes | 26 | Size (ada-bootstrap.x86_64.freebsd.84.tar.bz2) = 40227668 bytes | |
24 | SHA1 (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 683f58e6e394a508a52ec1dc5f3d9ca2869d5252 | 27 | SHA1 (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 683f58e6e394a508a52ec1dc5f3d9ca2869d5252 | |
25 | RMD160 (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 4574857089e82fb80725161cc8b625ce75f6810e | 28 | RMD160 (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 4574857089e82fb80725161cc8b625ce75f6810e | |
29 | SHA512 (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 6287668001dd6d45a1dfe2a6f548fe933ce2bff4fec43516dc76aad8aeb27859ee6660068edfbc9dc671f025e1635629212b1adc1308d5cc775dd19e1f1764b2 | |||
26 | Size (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 39348972 bytes | 30 | Size (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 39348972 bytes | |
27 | SHA1 (ada-bootstrap.x86_64.solaris.511.tar.bz2) = abb16c1582e2a6ffe37df4afd96d04c44f2eea7b | 31 | SHA1 (ada-bootstrap.x86_64.solaris.511.tar.bz2) = abb16c1582e2a6ffe37df4afd96d04c44f2eea7b | |
28 | RMD160 (ada-bootstrap.x86_64.solaris.511.tar.bz2) = 41677e2fd0cb02c89f200fb97b112ad3be7f19cd | 32 | RMD160 (ada-bootstrap.x86_64.solaris.511.tar.bz2) = 41677e2fd0cb02c89f200fb97b112ad3be7f19cd | |
33 | SHA512 (ada-bootstrap.x86_64.solaris.511.tar.bz2) = 59db01497b11bd4913cfedcbe3931caa361564c1f5eadddd200dc1e0516a44d107494ab898f93bc1050998f73623bf30a74f0933b84d9a03a3c9d51f3f2de8d9 | |||
29 | Size (ada-bootstrap.x86_64.solaris.511.tar.bz2) = 60110383 bytes | 34 | Size (ada-bootstrap.x86_64.solaris.511.tar.bz2) = 60110383 bytes | |
30 | SHA1 (gcc-5.1.0.tar.bz2) = b6c947b09adf780fe02065d0c48bfd7b4bdddfa3 | 35 | SHA1 (gcc-5.4.0.tar.bz2) = 07524df2b4ab9070bad9c49ab668da72237b8115 | |
31 | RMD160 (gcc-5.1.0.tar.bz2) = 17a9623f384ce10415a603042e0592c9b4956078 | 36 | RMD160 (gcc-5.4.0.tar.bz2) = 7ae3413ca7e90bb21e65e637c02ddf2b675b45f4 | |
32 | Size (gcc-5.1.0.tar.bz2) = 94954411 bytes | 37 | SHA512 (gcc-5.4.0.tar.bz2) = 2941cc950c8f2409a314df497631f9b0266211aa74746c1839c46e04f1c7c299afe2528d1ef16ea39def408a644ba48f97519ec7a7dd37d260c3e9423514265b | |
38 | Size (gcc-5.4.0.tar.bz2) = 95661481 bytes |
@@ -1035,43 +1035,56 @@ | @@ -1035,43 +1035,56 @@ | |||
1035 | 1035 | |||
1036 | Gcc_Exec := Locate_Exec_On_Path (Gcc_Name.all); | 1036 | Gcc_Exec := Locate_Exec_On_Path (Gcc_Name.all); | |
1037 | --- gcc/ada/prj-makr.adb.orig | 1037 | --- gcc/ada/prj-makr.adb.orig | |
1038 | +++ gcc/ada/prj-makr.adb | 1038 | +++ gcc/ada/prj-makr.adb | |
1039 | @@ -115,7 +115,7 @@ | 1039 | @@ -115,7 +115,7 @@ | |
1040 | 1040 | |||
1041 | procedure Dup2 (Old_Fd, New_Fd : File_Descriptor); | 1041 | procedure Dup2 (Old_Fd, New_Fd : File_Descriptor); | |
1042 | 1042 | |||
1043 | - Gcc : constant String := "gcc"; | 1043 | - Gcc : constant String := "gcc"; | |
1044 | + Gcc : constant String := "ada"; | 1044 | + Gcc : constant String := "ada"; | |
1045 | Gcc_Path : String_Access := null; | 1045 | Gcc_Path : String_Access := null; | |
1046 | 1046 | |||
1047 | Non_Empty_Node : constant Project_Node_Id := 1; | 1047 | Non_Empty_Node : constant Project_Node_Id := 1; | |
1048 | --- gcc/ada/s-osinte-android.ads.orig | 1048 | --- gcc/ada/s-oscons-tmplt.c.orig | |
1049 | +++ gcc/ada/s-osinte-android.ads | 1049 | +++ gcc/ada/s-oscons-tmplt.c | |
1050 | @@ -597,11 +597,11 @@ | 1050 | @@ -402,7 +402,7 @@ | |
1051 | 1051 | |||
1052 | type pid_t is new int; | 1052 | /* ioctl(2) requests are "int" in UNIX, but "unsigned long" on FreeBSD */ | |
1053 | 1053 | |||
1054 | - type time_t is new long; | 1054 | -#ifdef __FreeBSD__ | |
1055 | + type time_t is new Long_Long_Integer; | 1055 | +#if defined (__FreeBSD__) || defined (__DragonFly__) | |
1056 | 1056 | # define CNI CNU | ||
1057 | type timespec is record | 1057 | # define IOCTL_Req_T "unsigned" | |
1058 | - tv_sec : time_t; | 1058 | #else | |
1059 | - tv_nsec : long; | 1059 | @@ -1014,7 +1014,7 @@ | |
1060 | + ts_sec : time_t; | 1060 | ||
1061 | + ts_nsec : long; | 1061 | */ | |
1062 | end record; | 1062 | ||
1063 | pragma Convention (C, timespec); | 1063 | -#if defined (__FreeBSD__) || defined (linux) | |
1064 | +#if defined (__FreeBSD__) || defined (linux) || defined (__DragonFly__) | |||
1065 | # define PTY_Library "-lutil" | |||
1066 | #else | |||
1067 | # define PTY_Library "" | |||
1068 | @@ -1435,7 +1435,8 @@ | |||
1069 | #endif | |||
1070 | CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock") | |||
1064 | 1071 | |||
1072 | -#if defined(__FreeBSD__) || (defined(_AIX) && defined(_AIXVERSION_530)) | |||
1073 | +#if defined(__FreeBSD__) || (defined(_AIX) && defined(_AIXVERSION_530)) \ | |||
1074 | + || defined(__DragonFly__) | |||
1075 | /** On these platforms use system provided monotonic clock instead of | |||
1076 | ** the default CLOCK_REALTIME. We then need to set up cond var attributes | |||
1077 | ** appropriately (see thread.c). | |||
1065 | --- /dev/null | 1078 | --- /dev/null | |
1066 | +++ gcc/ada/s-osinte-dragonfly.adb | 1079 | +++ gcc/ada/s-osinte-dragonfly.adb | |
1067 | @@ -0,0 +1,116 @@ | 1080 | @@ -0,0 +1,116 @@ | |
1068 | +------------------------------------------------------------------------------ | 1081 | +------------------------------------------------------------------------------ | |
1069 | +-- -- | 1082 | +-- -- | |
1070 | +-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- | 1083 | +-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- | |
1071 | +-- -- | 1084 | +-- -- | |
1072 | +-- S Y S T E M . O S _ I N T E R F A C E -- | 1085 | +-- S Y S T E M . O S _ I N T E R F A C E -- | |
1073 | +-- -- | 1086 | +-- -- | |
1074 | +-- B o d y -- | 1087 | +-- B o d y -- | |
1075 | +-- -- | 1088 | +-- -- | |
1076 | +-- Copyright (C) 1991-2009, Free Software Foundation, Inc. -- | 1089 | +-- Copyright (C) 1991-2009, Free Software Foundation, Inc. -- | |
1077 | +-- -- | 1090 | +-- -- | |
@@ -3610,60 +3623,60 @@ | @@ -3610,60 +3623,60 @@ | |||
3610 | + s-trasym.adb<s-trasym-bsd.adb \ | 3623 | + s-trasym.adb<s-trasym-bsd.adb \ | |
3611 | s-inmaop.adb<s-inmaop-posix.adb \ | 3624 | s-inmaop.adb<s-inmaop-posix.adb \ | |
3612 | s-intman.adb<s-intman-solaris.adb \ | 3625 | s-intman.adb<s-intman-solaris.adb \ | |
3613 | s-mudido.adb<s-mudido-affinity.adb \ | 3626 | s-mudido.adb<s-mudido-affinity.adb \ | |
3614 | @@ -1208,6 +1210,8 @@ | 3627 | @@ -1208,6 +1210,8 @@ | |
3615 | TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb | 3628 | TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb | |
3616 | 3629 | |||
3617 | EH_MECHANISM=-gcc | 3630 | EH_MECHANISM=-gcc | |
3618 | + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c | 3631 | + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c | |
3619 | + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o | 3632 | + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o | |
3620 | THREADSLIB = -lposix4 -lthread | 3633 | THREADSLIB = -lposix4 -lthread | |
3621 | MISCLIB = -lposix4 -lnsl -lsocket | 3634 | MISCLIB = -lposix4 -lnsl -lsocket | |
3622 | SO_OPTS = -Wl,-h, | 3635 | SO_OPTS = -Wl,-h, | |
3623 | @@ -1420,8 +1424,11 @@ | 3636 | @@ -1416,8 +1420,11 @@ | |
3624 | ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),) | 3637 | ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),) | |
3625 | LIBGNAT_TARGET_PAIRS = \ | 3638 | LIBGNAT_TARGET_PAIRS = \ | |
3626 | a-intnam.ads<a-intnam-freebsd.ads \ | 3639 | a-intnam.ads<a-intnam-freebsd.ads \ | |
3627 | + g-socthi.adb<g-socthi-bsd.adb \ | 3640 | + g-socthi.adb<g-socthi-bsd.adb \ | |
3628 | + s-trasym.adb<s-trasym-bsd.adb \ | 3641 | + s-trasym.adb<s-trasym-bsd.adb \ | |
3629 | s-inmaop.adb<s-inmaop-posix.adb \ | 3642 | s-inmaop.adb<s-inmaop-posix.adb \ | |
3630 | s-intman.adb<s-intman-posix.adb \ | 3643 | s-intman.adb<s-intman-posix.adb \ | |
3631 | + s-mudido.adb<s-mudido-affinity.adb \ | 3644 | + s-mudido.adb<s-mudido-affinity.adb \ | |
3632 | s-osinte.adb<s-osinte-freebsd.adb \ | 3645 | s-osinte.adb<s-osinte-freebsd.adb \ | |
3633 | s-osinte.ads<s-osinte-freebsd.ads \ | 3646 | s-osinte.ads<s-osinte-freebsd.ads \ | |
3634 | s-osprim.adb<s-osprim-posix.adb \ | 3647 | s-osprim.adb<s-osprim-posix.adb \ | |
3635 | @@ -1436,6 +1443,8 @@ | 3648 | @@ -1432,6 +1439,8 @@ | |
3636 | mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb | 3649 | mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb | |
3637 | GNATLIB_SHARED = gnatlib-shared-dual | 3650 | GNATLIB_SHARED = gnatlib-shared-dual | |
3638 | 3651 | |||
3639 | + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c | 3652 | + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c | |
3640 | + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o | 3653 | + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o | |
3641 | EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o | 3654 | EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o | |
3642 | 3655 | |||
3643 | EH_MECHANISM=-gcc | 3656 | EH_MECHANISM=-gcc | |
3644 | @@ -1449,8 +1458,11 @@ | 3657 | @@ -1445,8 +1454,11 @@ | |
3645 | ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),) | 3658 | ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),) | |
3646 | LIBGNAT_TARGET_PAIRS = \ | 3659 | LIBGNAT_TARGET_PAIRS = \ | |
3647 | a-intnam.ads<a-intnam-freebsd.ads \ | 3660 | a-intnam.ads<a-intnam-freebsd.ads \ | |
3648 | + g-socthi.adb<g-socthi-bsd.adb \ | 3661 | + g-socthi.adb<g-socthi-bsd.adb \ | |
3649 | + s-trasym.adb<s-trasym-bsd.adb \ | 3662 | + s-trasym.adb<s-trasym-bsd.adb \ | |
3650 | s-inmaop.adb<s-inmaop-posix.adb \ | 3663 | s-inmaop.adb<s-inmaop-posix.adb \ | |
3651 | s-intman.adb<s-intman-posix.adb \ | 3664 | s-intman.adb<s-intman-posix.adb \ | |
3652 | + s-mudido.adb<s-mudido-affinity.adb \ | 3665 | + s-mudido.adb<s-mudido-affinity.adb \ | |
3653 | s-osinte.adb<s-osinte-freebsd.adb \ | 3666 | s-osinte.adb<s-osinte-freebsd.adb \ | |
3654 | s-osinte.ads<s-osinte-freebsd.ads \ | 3667 | s-osinte.ads<s-osinte-freebsd.ads \ | |
3655 | s-osprim.adb<s-osprim-posix.adb \ | 3668 | s-osprim.adb<s-osprim-posix.adb \ | |
3656 | @@ -1465,6 +1477,110 @@ | 3669 | @@ -1461,6 +1473,110 @@ | |
3657 | mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb | 3670 | mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb | |
3658 | GNATLIB_SHARED = gnatlib-shared-dual | 3671 | GNATLIB_SHARED = gnatlib-shared-dual | |
3659 | 3672 | |||
3660 | + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c | 3673 | + EXTRA_LIBGNAT_SRCS+= traceback_symbolic.c | |
3661 | + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o | 3674 | + EXTRA_LIBGNAT_OBJS+= traceback_symbolic.o | |
3662 | + EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o | 3675 | + EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o | |
3663 | + | 3676 | + | |
3664 | + EH_MECHANISM=-gcc | 3677 | + EH_MECHANISM=-gcc | |
3665 | + THREADSLIB= -lpthread | 3678 | + THREADSLIB= -lpthread | |
3666 | + GMEM_LIB = gmemlib | 3679 | + GMEM_LIB = gmemlib | |
3667 | + LIBRARY_VERSION := $(LIB_VERSION) | 3680 | + LIBRARY_VERSION := $(LIB_VERSION) | |
3668 | + MISCLIB = -lutil | 3681 | + MISCLIB = -lutil | |
3669 | +endif | 3682 | +endif |
@@ -1,234 +1,56 @@ | @@ -1,234 +1,56 @@ | |||
1 | --- gcc/config/dragonfly.h.orig | 1 | --- gcc/config/dragonfly.h.orig | |
2 | +++ gcc/config/dragonfly.h | 2 | +++ gcc/config/dragonfly.h | |
3 | @@ -84,7 +84,7 @@ | 3 | @@ -84,7 +84,7 @@ | |
4 | } \ | 4 | } \ | |
5 | %{static:-Bstatic} \ | 5 | %{static:-Bstatic} \ | |
6 | } \ | 6 | } \ | |
7 | - %{!static:--hash-style=gnu} \ | 7 | - %{!static:--hash-style=gnu} \ | |
8 | + %{!static:--hash-style=gnu -rpath @PREFIX@/@GCCAUX@/lib} \ | 8 | + %{!static:--hash-style=gnu -rpath @PREFIX@/@GCCAUX@/lib} \ | |
9 | %{symbolic:-Bsymbolic}" | 9 | %{symbolic:-Bsymbolic}" | |
10 | 10 | |||
11 | #undef LINK_SPEC | 11 | #undef LINK_SPEC | |
12 | --- gcc/config/i386/freebsd.h.orig | 12 | --- gcc/config/i386/freebsd.h.orig | |
13 | +++ gcc/config/i386/freebsd.h | 13 | +++ gcc/config/i386/freebsd.h | |
14 | @@ -90,6 +90,14 @@ | 14 | @@ -77,6 +77,12 @@ | |
15 | When the -shared link option is used a final link is not being | 15 | When the -shared link option is used a final link is not being | |
16 | done. */ | 16 | done. */ | |
17 | 17 | |||
18 | +#if FBSD_MAJOR < 9 | 18 | +#if FBSD_MAJOR < 10 | |
19 | +#define ELF_HASH_STYLE "" | |||
20 | +#elif FBSD_MAJOR < 10 | |||
21 | +#define ELF_HASH_STYLE "--hash-style=both " | 19 | +#define ELF_HASH_STYLE "--hash-style=both " | |
22 | +#else | 20 | +#else | |
23 | +#define ELF_HASH_STYLE "--hash-style=gnu " | 21 | +#define ELF_HASH_STYLE "--hash-style=gnu " | |
24 | +#endif | 22 | +#endif | |
25 | + | 23 | + | |
26 | #undef LINK_SPEC | 24 | #undef LINK_SPEC | |
27 | #define LINK_SPEC "\ | 25 | #define LINK_SPEC "\ | |
28 | %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \ | 26 | %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \ | |
29 | @@ -101,6 +109,7 @@ | 27 | @@ -88,6 +94,7 @@ | |
30 | %{rdynamic:-export-dynamic} \ | 28 | %{rdynamic:-export-dynamic} \ | |
31 | -dynamic-linker %(fbsd_dynamic_linker) } \ | 29 | -dynamic-linker %(fbsd_dynamic_linker) } \ | |
32 | %{static:-Bstatic}} \ | 30 | %{static:-Bstatic}} \ | |
33 | + %{!static:" ELF_HASH_STYLE "-rpath @PREFIX@/@GCCAUX@/lib} \ | 31 | + %{!static:" ELF_HASH_STYLE "-rpath @PREFIX@/@GCCAUX@/lib} \ | |
34 | %{symbolic:-Bsymbolic}" | 32 | %{symbolic:-Bsymbolic}" | |
35 | 33 | |||
36 | /* A C statement to output to the stdio stream FILE an assembler | 34 | /* A C statement to output to the stdio stream FILE an assembler | |
37 | --- gcc/config/i386/freebsd64.h.orig | 35 | --- gcc/config/i386/freebsd64.h.orig | |
38 | +++ gcc/config/i386/freebsd64.h | 36 | +++ gcc/config/i386/freebsd64.h | |
39 | @@ -41,4 +41,5 @@ | 37 | @@ -41,4 +41,5 @@ | |
40 | %{rdynamic:-export-dynamic} \ | 38 | %{rdynamic:-export-dynamic} \ | |
41 | -dynamic-linker %(fbsd_dynamic_linker) } \ | 39 | -dynamic-linker %(fbsd_dynamic_linker) } \ | |
42 | %{static:-Bstatic}} \ | 40 | %{static:-Bstatic}} \ | |
43 | + %{!static:" ELF_HASH_STYLE "-rpath @PREFIX@/@GCCAUX@/lib} \ | 41 | + %{!static:" ELF_HASH_STYLE "-rpath @PREFIX@/@GCCAUX@/lib} \ | |
44 | %{symbolic:-Bsymbolic}" | 42 | %{symbolic:-Bsymbolic}" | |
45 | --- /dev/null | 43 | --- /dev/null | |
46 | +++ libgcc/config/i386/freebsd-unwind.h | |||
47 | @@ -0,0 +1,173 @@ | |||
48 | +/* DWARF2 EH unwinding support for FreeBSD: AMD x86-64 and x86. | |||
49 | + Copyright (C) 2015 Free Software Foundation, Inc. | |||
50 | + Contributed by John Marino <gnugcc@marino.st> | |||
51 | + | |||
52 | +This file is part of GCC. | |||
53 | + | |||
54 | +GCC is free software; you can redistribute it and/or modify | |||
55 | +it under the terms of the GNU General Public License as published by | |||
56 | +the Free Software Foundation; either version 3, or (at your option) | |||
57 | +any later version. | |||
58 | + | |||
59 | +GCC is distributed in the hope that it will be useful, | |||
60 | +but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
61 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
62 | +GNU General Public License for more details. | |||
63 | + | |||
64 | +Under Section 7 of GPL version 3, you are granted additional | |||
65 | +permissions described in the GCC Runtime Library Exception, version | |||
66 | +3.1, as published by the Free Software Foundation. | |||
67 | + | |||
68 | +You should have received a copy of the GNU General Public License and | |||
69 | +a copy of the GCC Runtime Library Exception along with this program; | |||
70 | +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |||
71 | +<http://www.gnu.org/licenses/>. */ | |||
72 | + | |||
73 | +/* Do code reading to identify a signal frame, and set the frame | |||
74 | + state data appropriately. See unwind-dw2.c for the structs. */ | |||
75 | + | |||
76 | +#include <sys/types.h> | |||
77 | +#include <signal.h> | |||
78 | +#include <sys/ucontext.h> | |||
79 | +#include <machine/sigframe.h> | |||
80 | + | |||
81 | +#define REG_NAME(reg) sf_uc.uc_mcontext.mc_## reg | |||
82 | + | |||
83 | +#ifdef __x86_64__ | |||
84 | +#define MD_FALLBACK_FRAME_STATE_FOR x86_64_freebsd_fallback_frame_state | |||
85 | + | |||
86 | +static _Unwind_Reason_Code | |||
87 | +x86_64_freebsd_fallback_frame_state | |||
88 | +(struct _Unwind_Context *context, _Unwind_FrameState *fs) | |||
89 | +{ | |||
90 | + struct sigframe *sf; | |||
91 | + long new_cfa; | |||
92 | + | |||
93 | + /* Prior to FreeBSD 9, the signal trampoline was located immediately | |||
94 | + before the ps_strings. To support non-executable stacks on AMD64, | |||
95 | + the sigtramp was moved to a shared page for FreeBSD 9. Unfortunately | |||
96 | + this means looking frame patterns again (sys/amd64/amd64/sigtramp.S) | |||
97 | + rather than using the robust and convenient KERN_PS_STRINGS trick. | |||
98 | + | |||
99 | + <pc + 00>: lea 0x10(%rsp),%rdi | |||
100 | + <pc + 05>: pushq $0x0 | |||
101 | + <pc + 17>: mov $0x1a1,%rax | |||
102 | + <pc + 14>: syscall | |||
103 | + | |||
104 | + If we can't find this pattern, we're at the end of the stack. | |||
105 | + */ | |||
106 | + | |||
107 | + if (!( *(unsigned int *)(context->ra) == 0x247c8d48 | |||
108 | + && *(unsigned int *)(context->ra + 4) == 0x48006a10 | |||
109 | + && *(unsigned int *)(context->ra + 8) == 0x01a1c0c7 | |||
110 | + && *(unsigned int *)(context->ra + 12) == 0x050f0000 )) | |||
111 | + return _URC_END_OF_STACK; | |||
112 | + | |||
113 | + sf = (struct sigframe *) context->cfa; | |||
114 | + new_cfa = sf->REG_NAME(rsp); | |||
115 | + fs->regs.cfa_how = CFA_REG_OFFSET; | |||
116 | + /* Register 7 is rsp */ | |||
117 | + fs->regs.cfa_reg = 7; | |||
118 | + fs->regs.cfa_offset = new_cfa - (long) context->cfa; | |||
119 | + | |||
120 | + /* The SVR4 register numbering macros aren't usable in libgcc. */ | |||
121 | + fs->regs.reg[0].how = REG_SAVED_OFFSET; | |||
122 | + fs->regs.reg[0].loc.offset = (long)&sf->REG_NAME(rax) - new_cfa; | |||
123 | + fs->regs.reg[1].how = REG_SAVED_OFFSET; | |||
124 | + fs->regs.reg[1].loc.offset = (long)&sf->REG_NAME(rdx) - new_cfa; | |||
125 | + fs->regs.reg[2].how = REG_SAVED_OFFSET; | |||
126 | + fs->regs.reg[2].loc.offset = (long)&sf->REG_NAME(rcx) - new_cfa; | |||
127 | + fs->regs.reg[3].how = REG_SAVED_OFFSET; | |||
128 | + fs->regs.reg[3].loc.offset = (long)&sf->REG_NAME(rbx) - new_cfa; | |||
129 | + fs->regs.reg[4].how = REG_SAVED_OFFSET; | |||
130 | + fs->regs.reg[4].loc.offset = (long)&sf->REG_NAME(rsi) - new_cfa; | |||
131 | + fs->regs.reg[5].how = REG_SAVED_OFFSET; | |||
132 | + fs->regs.reg[5].loc.offset = (long)&sf->REG_NAME(rdi) - new_cfa; | |||
133 | + fs->regs.reg[6].how = REG_SAVED_OFFSET; | |||
134 | + fs->regs.reg[6].loc.offset = (long)&sf->REG_NAME(rbp) - new_cfa; | |||
135 | + fs->regs.reg[8].how = REG_SAVED_OFFSET; | |||
136 | + fs->regs.reg[8].loc.offset = (long)&sf->REG_NAME(r8) - new_cfa; | |||
137 | + fs->regs.reg[9].how = REG_SAVED_OFFSET; | |||
138 | + fs->regs.reg[9].loc.offset = (long)&sf->REG_NAME(r9) - new_cfa; | |||
139 | + fs->regs.reg[10].how = REG_SAVED_OFFSET; | |||
140 | + fs->regs.reg[10].loc.offset = (long)&sf->REG_NAME(r10) - new_cfa; | |||
141 | + fs->regs.reg[11].how = REG_SAVED_OFFSET; | |||
142 | + fs->regs.reg[11].loc.offset = (long)&sf->REG_NAME(r11) - new_cfa; | |||
143 | + fs->regs.reg[12].how = REG_SAVED_OFFSET; | |||
144 | + fs->regs.reg[12].loc.offset = (long)&sf->REG_NAME(r12) - new_cfa; | |||
145 | + fs->regs.reg[13].how = REG_SAVED_OFFSET; | |||
146 | + fs->regs.reg[13].loc.offset = (long)&sf->REG_NAME(r13) - new_cfa; | |||
147 | + fs->regs.reg[14].how = REG_SAVED_OFFSET; | |||
148 | + fs->regs.reg[14].loc.offset = (long)&sf->REG_NAME(r14) - new_cfa; | |||
149 | + fs->regs.reg[15].how = REG_SAVED_OFFSET; | |||
150 | + fs->regs.reg[15].loc.offset = (long)&sf->REG_NAME(r15) - new_cfa; | |||
151 | + fs->regs.reg[16].how = REG_SAVED_OFFSET; | |||
152 | + fs->regs.reg[16].loc.offset = (long)&sf->REG_NAME(rip) - new_cfa; | |||
153 | + fs->retaddr_column = 16; | |||
154 | + fs->signal_frame = 1; | |||
155 | + return _URC_NO_REASON; | |||
156 | +} | |||
157 | + | |||
158 | +#else /* Next section is for i386 */ | |||
159 | + | |||
160 | +#define MD_FALLBACK_FRAME_STATE_FOR x86_freebsd_fallback_frame_state | |||
161 | + | |||
162 | +/* | |||
163 | + * We can't use KERN_PS_STRINGS anymore if we want to support FreeBSD32 | |||
164 | + * compat on AMD64. The sigtramp is in a shared page in that case so the | |||
165 | + * x86_sigtramp_range only works on a true i386 system. We have to | |||
166 | + * search for the sigtramp frame if we want it working everywhere. | |||
167 | + */ | |||
168 | + | |||
169 | +static _Unwind_Reason_Code | |||
170 | +x86_freebsd_fallback_frame_state | |||
171 | +(struct _Unwind_Context *context, _Unwind_FrameState *fs) | |||
172 | +{ | |||
173 | + struct sigframe *sf; | |||
174 | + long new_cfa; | |||
175 | + | |||
176 | +/* | |||
177 | + * i386 sigtramp frame we are looking for follows. | |||
178 | + * Apparently PSL_VM is variable, so we can't look past context->ra + 4 | |||
179 | + * <sigcode>: | |||
180 | + * 0: ff 54 24 10 call *0x10(%esp) *SIGF_HANDLER | |||
181 | + * 4: 8d 44 24 20 lea 0x20(%esp),%eax SIGF_UC | |||
182 | + * 8: 50 push %eax | |||
183 | + * 9: f7 40 54 00 00 02 00 testl $0x20000,0x54(%eax) $PSL_VM | |||
184 | + * 10: 75 03 jne 15 <sigcode+0x15> | |||
185 | + * 12: 8e 68 14 mov 0x14(%eax),%gs UC_GS | |||
186 | + * 15: b8 a1 01 00 00 mov 0x1a1,%eax $SYS_sigreturn | |||
187 | + */ | |||
188 | + | |||
189 | + if (!( *(unsigned int *)(context->ra - 4) == 0x102454ff | |||
190 | + && *(unsigned int *)(context->ra) == 0x2024448d )) | |||
191 | + return _URC_END_OF_STACK; | |||
192 | + | |||
193 | + sf = (struct sigframe *) context->cfa; | |||
194 | + new_cfa = sf->REG_NAME(esp); | |||
195 | + fs->regs.cfa_how = CFA_REG_OFFSET; | |||
196 | + fs->regs.cfa_reg = 4; | |||
197 | + fs->regs.cfa_offset = new_cfa - (long) context->cfa; | |||
198 | + | |||
199 | + /* The SVR4 register numbering macros aren't usable in libgcc. */ | |||
200 | + fs->regs.reg[0].how = REG_SAVED_OFFSET; | |||
201 | + fs->regs.reg[0].loc.offset = (long)&sf->REG_NAME(eax) - new_cfa; | |||
202 | + fs->regs.reg[3].how = REG_SAVED_OFFSET; | |||
203 | + fs->regs.reg[3].loc.offset = (long)&sf->REG_NAME(ebx) - new_cfa; | |||
204 | + fs->regs.reg[1].how = REG_SAVED_OFFSET; | |||
205 | + fs->regs.reg[1].loc.offset = (long)&sf->REG_NAME(ecx) - new_cfa; | |||
206 | + fs->regs.reg[2].how = REG_SAVED_OFFSET; | |||
207 | + fs->regs.reg[2].loc.offset = (long)&sf->REG_NAME(edx) - new_cfa; | |||
208 | + fs->regs.reg[6].how = REG_SAVED_OFFSET; | |||
209 | + fs->regs.reg[6].loc.offset = (long)&sf->REG_NAME(esi) - new_cfa; | |||
210 | + fs->regs.reg[7].how = REG_SAVED_OFFSET; | |||
211 | + fs->regs.reg[7].loc.offset = (long)&sf->REG_NAME(edi) - new_cfa; | |||
212 | + fs->regs.reg[5].how = REG_SAVED_OFFSET; | |||
213 | + fs->regs.reg[5].loc.offset = (long)&sf->REG_NAME(ebp) - new_cfa; | |||
214 | + fs->regs.reg[8].how = REG_SAVED_OFFSET; | |||
215 | + fs->regs.reg[8].loc.offset = (long)&sf->REG_NAME(eip) - new_cfa; | |||
216 | + fs->retaddr_column = 8; | |||
217 | + fs->signal_frame = 1; | |||
218 | + return _URC_NO_REASON; | |||
219 | +} | |||
220 | +#endif /* ifdef __x86_64__ */ | |||
221 | --- /dev/null | |||
222 | +++ libgcc/config/i386/netbsd-unwind.h | 44 | +++ libgcc/config/i386/netbsd-unwind.h | |
223 | @@ -0,0 +1,178 @@ | 45 | @@ -0,0 +1,178 @@ | |
224 | +/* DWARF2 EH unwinding support for NetBSD: AMD x86-64 and x86. | 46 | +/* DWARF2 EH unwinding support for NetBSD: AMD x86-64 and x86. | |
225 | + Copyright (C) 2015 Free Software Foundation, Inc. | 47 | + Copyright (C) 2015 Free Software Foundation, Inc. | |
226 | + Contributed by John Marino <gnugcc@marino.st> | 48 | + Contributed by John Marino <gnugcc@marino.st> | |
227 | + | 49 | + | |
228 | +This file is part of GCC. | 50 | +This file is part of GCC. | |
229 | + | 51 | + | |
230 | +GCC is free software; you can redistribute it and/or modify | 52 | +GCC is free software; you can redistribute it and/or modify | |
231 | +it under the terms of the GNU General Public License as published by | 53 | +it under the terms of the GNU General Public License as published by | |
232 | +the Free Software Foundation; either version 3, or (at your option) | 54 | +the Free Software Foundation; either version 3, or (at your option) | |
233 | +any later version. | 55 | +any later version. | |
234 | + | 56 | + | |
@@ -420,48 +242,48 @@ | @@ -420,48 +242,48 @@ | |||
420 | void | 242 | void | |
421 | setproctitle (const char *name ATTRIBUTE_UNUSED, ...) | 243 | setproctitle (const char *name ATTRIBUTE_UNUSED, ...) | |
422 | { | 244 | { | |
423 | +#ifndef __ANDROID__ | 245 | +#ifndef __ANDROID__ | |
424 | #ifdef PR_SET_NAME | 246 | #ifdef PR_SET_NAME | |
425 | /* On GNU/Linux this sets the top visible "comm", but not | 247 | /* On GNU/Linux this sets the top visible "comm", but not | |
426 | necessarily the name visible in ps. */ | 248 | necessarily the name visible in ps. */ | |
427 | prctl (PR_SET_NAME, name); | 249 | prctl (PR_SET_NAME, name); | |
428 | #endif | 250 | #endif | |
429 | +#endif | 251 | +#endif | |
430 | } | 252 | } | |
431 | --- gcc/config.gcc.orig | 253 | --- gcc/config.gcc.orig | |
432 | +++ gcc/config.gcc | 254 | +++ gcc/config.gcc | |
433 | @@ -1393,12 +1393,16 @@ | 255 | @@ -1399,12 +1399,16 @@ | |
434 | tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" | 256 | tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" | |
435 | ;; | 257 | ;; | |
436 | i[34567]86-*-netbsdelf*) | 258 | i[34567]86-*-netbsdelf*) | |
437 | - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h" | 259 | - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h" | |
438 | + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h freebsd-stdint.h" | 260 | + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h freebsd-stdint.h" | |
439 | extra_options="${extra_options} netbsd.opt netbsd-elf.opt" | 261 | extra_options="${extra_options} netbsd.opt netbsd-elf.opt" | |
440 | + tmake_file="${tmake_file} i386/t-crtstuff" | 262 | + tmake_file="${tmake_file} i386/t-crtstuff" | |
441 | + use_gcc_stdint=wrap | 263 | + use_gcc_stdint=wrap | |
442 | ;; | 264 | ;; | |
443 | x86_64-*-netbsd*) | 265 | x86_64-*-netbsd*) | |
444 | - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h" | 266 | - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h" | |
445 | + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h freebsd-stdint.h" | 267 | + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h freebsd-stdint.h" | |
446 | extra_options="${extra_options} netbsd.opt netbsd-elf.opt" | 268 | extra_options="${extra_options} netbsd.opt netbsd-elf.opt" | |
447 | + tmake_file="${tmake_file} i386/t-crtstuff" | 269 | + tmake_file="${tmake_file} i386/t-crtstuff" | |
448 | + use_gcc_stdint=wrap | 270 | + use_gcc_stdint=wrap | |
449 | ;; | 271 | ;; | |
450 | i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) | 272 | i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) | |
451 | tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h" | 273 | tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h" | |
452 | --- gcc/configure.orig | 274 | --- gcc/configure.orig | |
453 | +++ gcc/configure | 275 | +++ gcc/configure | |
454 | @@ -27806,6 +27806,13 @@ | 276 | @@ -27961,6 +27961,13 @@ | |
455 | gcc_cv_target_dl_iterate_phdr=no | 277 | gcc_cv_target_dl_iterate_phdr=no | |
456 | fi | 278 | fi | |
457 | ;; | 279 | ;; | |
458 | + *-*-netbsd*) | 280 | + *-*-netbsd*) | |
459 | + if grep dl_iterate_phdr $target_header_dir/link_elf.h > /dev/null 2>&1; then | 281 | + if grep dl_iterate_phdr $target_header_dir/link_elf.h > /dev/null 2>&1; then | |
460 | + gcc_cv_target_dl_iterate_phdr=yes | 282 | + gcc_cv_target_dl_iterate_phdr=yes | |
461 | + else | 283 | + else | |
462 | + gcc_cv_target_dl_iterate_phdr=no | 284 | + gcc_cv_target_dl_iterate_phdr=no | |
463 | + fi | 285 | + fi | |
464 | + ;; | 286 | + ;; | |
465 | esac | 287 | esac | |
466 | 288 | |||
467 | if test x$gcc_cv_target_dl_iterate_phdr = xyes; then | 289 | if test x$gcc_cv_target_dl_iterate_phdr = xyes; then | |
@@ -517,106 +339,104 @@ | @@ -517,106 +339,104 @@ | |||
517 | @@ -65,6 +65,12 @@ | 339 | @@ -65,6 +65,12 @@ | |
518 | #endif | 340 | #endif | |
519 | 341 | |||
520 | #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ | 342 | #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ | |
521 | + && defined(TARGET_DL_ITERATE_PHDR) && defined(__NetBSD__) | 343 | + && defined(TARGET_DL_ITERATE_PHDR) && defined(__NetBSD__) | |
522 | +# define ElfW(type) Elf_##type | 344 | +# define ElfW(type) Elf_##type | |
523 | +# define USE_PT_GNU_EH_FRAME | 345 | +# define USE_PT_GNU_EH_FRAME | |
524 | +#endif | 346 | +#endif | |
525 | + | 347 | + | |
526 | +#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ | 348 | +#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ | |
527 | && defined(__OpenBSD__) | 349 | && defined(__OpenBSD__) | |
528 | # define ElfW(type) Elf_##type | 350 | # define ElfW(type) Elf_##type | |
529 | # define USE_PT_GNU_EH_FRAME | 351 | # define USE_PT_GNU_EH_FRAME | |
352 | --- libgcc/config.host.orig | |||
353 | +++ libgcc/config.host | |||
354 | @@ -240,7 +240,8 @@ | |||
355 | extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" | |||
356 | ;; | |||
357 | *-*-netbsd*) | |||
358 | - tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" | |||
359 | + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" | |||
360 | + tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" | |||
361 | # NetBSD 1.7 and later are set up to use GCC's crtstuff for | |||
362 | # ELF configurations. We will clear extra_parts in the | |||
363 | # a.out configurations. | |||
364 | @@ -579,9 +580,12 @@ | |||
365 | md_unwind_header=i386/freebsd-unwind.h | |||
366 | ;; | |||
367 | i[34567]86-*-netbsdelf*) | |||
368 | + tmake_file="${tmake_file} i386/t-crtstuff" | |||
369 | + md_unwind_header=i386/netbsd-unwind.h | |||
370 | ;; | |||
371 | x86_64-*-netbsd*) | |||
372 | tmake_file="${tmake_file} i386/t-crtstuff" | |||
373 | + md_unwind_header=i386/netbsd-unwind.h | |||
374 | ;; | |||
375 | i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) | |||
376 | ;; | |||
530 | --- gcc/Makefile.in.orig | 377 | --- gcc/Makefile.in.orig | |
531 | +++ gcc/Makefile.in | 378 | +++ gcc/Makefile.in | |
532 | @@ -1156,7 +1156,6 @@ | 379 | @@ -1163,7 +1163,6 @@ | |
533 | insn-emit.o \ | 380 | insn-emit.o \ | |
534 | insn-extract.o \ | 381 | insn-extract.o \ | |
535 | insn-latencytab.o \ | 382 | insn-latencytab.o \ | |
536 | - insn-modes.o \ | 383 | - insn-modes.o \ | |
537 | insn-opinit.o \ | 384 | insn-opinit.o \ | |
538 | insn-output.o \ | 385 | insn-output.o \ | |
539 | insn-peep.o \ | 386 | insn-peep.o \ | |
540 | @@ -1511,6 +1510,7 @@ | 387 | @@ -1518,6 +1517,7 @@ | |
541 | $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \ | 388 | $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \ | |
542 | $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \ | 389 | $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \ | |
543 | $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \ | 390 | $(GCOV_TOOL_OBJS) $(GENGTYPE_OBJS) gcc-ar.o gcc-nm.o gcc-ranlib.o \ | |
544 | + insn-modes.o insn-modes-ada.o \ | 391 | + insn-modes.o insn-modes-ada.o \ | |
545 | lto-wrapper.o collect-utils.o | 392 | lto-wrapper.o collect-utils.o | |
546 | 393 | |||
547 | # This lists all host object files, whether they are included in this | 394 | # This lists all host object files, whether they are included in this | |
548 | @@ -1518,6 +1518,11 @@ | 395 | @@ -1525,6 +1525,11 @@ | |
549 | ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS) | 396 | ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS) $(ALL_HOST_BACKEND_OBJS) | |
550 | 397 | |||
551 | BACKEND = libbackend.a main.o @TREEBROWSER@ libcommon-target.a libcommon.a \ | 398 | BACKEND = libbackend.a main.o @TREEBROWSER@ libcommon-target.a libcommon.a \ | |
552 | + insn-modes.o \ | 399 | + insn-modes.o \ | |
553 | + $(CPPLIB) $(LIBDECNUMBER) | 400 | + $(CPPLIB) $(LIBDECNUMBER) | |
554 | + | 401 | + | |
555 | +BACKEND2 = libbackend.a main.o @TREEBROWSER@ libcommon-target.a libcommon.a \ | 402 | +BACKEND2 = libbackend.a main.o @TREEBROWSER@ libcommon-target.a libcommon.a \ | |
556 | + insn-modes-ada.o \ | 403 | + insn-modes-ada.o \ | |
557 | $(CPPLIB) $(LIBDECNUMBER) | 404 | $(CPPLIB) $(LIBDECNUMBER) | |
558 | 405 | |||
559 | # This is defined to "yes" if Tree checking is enabled, which roughly means | 406 | # This is defined to "yes" if Tree checking is enabled, which roughly means | |
560 | @@ -2164,6 +2169,7 @@ | 407 | @@ -2171,6 +2176,7 @@ | |
561 | 408 | |||
562 | insn-modes.c: s-modes; @true | 409 | insn-modes.c: s-modes; @true | |
563 | insn-modes.h: s-modes-h; @true | 410 | insn-modes.h: s-modes-h; @true | |
564 | +insn-modes-ada.c: s-modes-ada; @true | 411 | +insn-modes-ada.c: s-modes-ada; @true | |
565 | min-insn-modes.c: s-modes-m; @true | 412 | min-insn-modes.c: s-modes-m; @true | |
566 | 413 | |||
567 | s-modes: build/genmodes$(build_exeext) | 414 | s-modes: build/genmodes$(build_exeext) | |
568 | @@ -2181,6 +2187,12 @@ | 415 | @@ -2188,6 +2194,12 @@ | |
569 | $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c | 416 | $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c | |
570 | $(STAMP) s-modes-m | 417 | $(STAMP) s-modes-m | |
571 | 418 | |||
572 | +s-modes-ada: s-modes | 419 | +s-modes-ada: s-modes | |
573 | + $(shell sed -e 's/: TARGET_96_ROUND_53_LONG_DOUBLE \? &ieee_extended_intel_96_round_53_format //' \ | 420 | + $(shell sed -e 's/: TARGET_96_ROUND_53_LONG_DOUBLE \? &ieee_extended_intel_96_round_53_format //' \ | |
574 | + < insn-modes.c > tmp-modes-ada.c) | 421 | + < insn-modes.c > tmp-modes-ada.c) | |
575 | + $(SHELL) $(srcdir)/../move-if-change tmp-modes-ada.c insn-modes-ada.c | 422 | + $(SHELL) $(srcdir)/../move-if-change tmp-modes-ada.c insn-modes-ada.c | |
576 | + $(STAMP) s-modes-ada | 423 | + $(STAMP) s-modes-ada | |
577 | + | 424 | + | |
578 | insn-preds.c: s-preds; @true | 425 | insn-preds.c: s-preds; @true | |
579 | tm-preds.h: s-preds-h; @true | 426 | tm-preds.h: s-preds-h; @true | |
580 | tm-constrs.h: s-constrs-h; @true | 427 | tm-constrs.h: s-constrs-h; @true | |
581 | @@ -3326,6 +3338,9 @@ | 428 | @@ -3333,6 +3345,9 @@ | |
582 | ( cd $(DESTDIR)$(bindir) && \ | 429 | ( cd $(DESTDIR)$(bindir) && \ | |
583 | $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \ | 430 | $(LN) $(GCC_INSTALL_NAME)$(exeext) $(FULL_DRIVER_NAME) ); \ | |
584 | fi; \ | 431 | fi; \ | |
585 | + if [ -f gnat1$(exeext) ] ; then \ | 432 | + if [ -f gnat1$(exeext) ] ; then \ | |
586 | + ( cd $(DESTDIR)$(bindir) && $(LN) $(GCC_INSTALL_NAME)$(exeext) ada$(exeext) ) \ | 433 | + ( cd $(DESTDIR)$(bindir) && $(LN) $(GCC_INSTALL_NAME)$(exeext) ada$(exeext) ) \ | |
587 | + fi; \ | 434 | + fi; \ | |
588 | if [ ! -f gcc-cross$(exeext) ] \ | 435 | if [ ! -f gcc-cross$(exeext) ] \ | |
589 | && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \ | 436 | && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \ | |
590 | rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \ | 437 | rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \ | |
591 | --- libgcc/config.host.orig | 438 | --- libgcc/config/i386/t-dragonfly.orig | |
592 | +++ libgcc/config.host | 439 | +++ libgcc/config/i386/t-dragonfly | |
593 | @@ -240,7 +240,8 @@ | 440 | @@ -0,0 +1,2 @@ | |
594 | extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" | 441 | +# Required for -fcilkplus support | |
595 | ;; | 442 | +SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-bsd.ver | |
596 | *-*-netbsd*) | |||
597 | - tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" | |||
598 | + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" | |||
599 | + tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" | |||
600 | # NetBSD 1.7 and later are set up to use GCC's crtstuff for | |||
601 | # ELF configurations. We will clear extra_parts in the | |||
602 | # a.out configurations. | |||
603 | @@ -567,14 +568,19 @@ | |||
604 | ;; | |||
605 | i[34567]86-*-freebsd*) | |||
606 | tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff" | |||
607 | + md_unwind_header=i386/freebsd-unwind.h | |||
608 | ;; | |||
609 | x86_64-*-freebsd*) | |||
610 | tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff" | |||
611 | + md_unwind_header=i386/freebsd-unwind.h | |||
612 | ;; | |||
613 | i[34567]86-*-netbsdelf*) | |||
614 | + tmake_file="${tmake_file} i386/t-crtstuff" | |||
615 | + md_unwind_header=i386/netbsd-unwind.h | |||
616 | ;; | |||
617 | x86_64-*-netbsd*) | |||
618 | tmake_file="${tmake_file} i386/t-crtstuff" | |||
619 | + md_unwind_header=i386/netbsd-unwind.h | |||
620 | ;; | |||
621 | i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) | |||
622 | ;; |
@@ -1,13 +1,122 @@ | @@ -1,13 +1,122 @@ | |||
1 | --- libstdc++-v3/config/locale/dragonfly/c_locale.cc.orig | |||
2 | +++ libstdc++-v3/config/locale/dragonfly/c_locale.cc | |||
3 | @@ -36,6 +36,7 @@ | |||
4 | #include <locale> | |||
5 | #include <limits> | |||
6 | ||||
7 | +#include <xlocale.h> | |||
8 | #ifdef _GLIBCXX_HAVE_IEEEFP_H | |||
9 | #include <ieeefp.h> | |||
10 | #endif | |||
11 | @@ -206,61 +207,45 @@ | |||
12 | delete [] __sav; | |||
13 | } | |||
14 | ||||
15 | - | |||
16 | - /* DragonFly's implementation of setlocale won't accept something like | |||
17 | - "de_DE". According to nls manpage, the expected format is: | |||
18 | - language[_territory][.codeset][@modifier], but it seems that both | |||
19 | - the _territory and .codeset components are required. | |||
20 | - | |||
21 | - As an attempt to correct for this, we'll tack on ".UTF-8" if | |||
22 | - a period is not detected in the locale string. | |||
23 | - | |||
24 | - There are no locales with modifiers on DragonFly so if found, they | |||
25 | - will just be stripped off silently. e.g "de_DE@euro" will be reduced | |||
26 | - to "de_DE". The UTF-8 default would be added after that. | |||
27 | - */ | |||
28 | - | |||
29 | void | |||
30 | locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, | |||
31 | - __c_locale) | |||
32 | + __c_locale __old) | |||
33 | { | |||
34 | - const size_t size__s = (__s == NULL) ? 1 : strlen (__s); | |||
35 | - const char UTF8[] = ".UTF-8"; | |||
36 | - char localspec[size__s + 6 + 1]; | |||
37 | - | |||
38 | - if (__s == NULL) { | |||
39 | - localspec[0] = '\0'; | |||
40 | - } else { | |||
41 | - strcpy (localspec, __s); | |||
42 | - char * pch = strchr (localspec, '@'); | |||
43 | - if (pch != NULL) | |||
44 | - *pch = 0; | |||
45 | - | |||
46 | - if ( (strchr (__s, '.') == NULL) | |||
47 | - && (strcmp (__s, "C") != 0) | |||
48 | - && (strcmp (__s, "POSIX") != 0)) | |||
49 | - strncat (localspec, UTF8, 6); | |||
50 | - } | |||
51 | - | |||
52 | - const char * result = std::setlocale(LC_ALL, localspec); | |||
53 | + __cloc = (__c_locale)newlocale(LC_ALL_MASK, __s, (locale_t)__old); | |||
54 | ||||
55 | - if ((strcmp(result, "C") != 0) && (strcmp (result, localspec) != 0)) | |||
56 | + if (!__cloc) | |||
57 | __throw_runtime_error(__N("locale::facet::_S_create_c_locale " | |||
58 | "name not valid")); | |||
59 | - __cloc = 0; | |||
60 | } | |||
61 | ||||
62 | void | |||
63 | locale::facet::_S_destroy_c_locale(__c_locale& __cloc) | |||
64 | - { __cloc = 0; } | |||
65 | + { | |||
66 | + if (__cloc && _S_get_c_locale() != __cloc) | |||
67 | + freelocale((locale_t)__cloc); | |||
68 | + } | |||
69 | ||||
70 | __c_locale | |||
71 | - locale::facet::_S_clone_c_locale(__c_locale&) throw() | |||
72 | - { return __c_locale(); } | |||
73 | + locale::facet::_S_clone_c_locale(__c_locale& __cloc) throw() | |||
74 | + { return (__c_locale)duplocale((locale_t)__cloc); } | |||
75 | ||||
76 | __c_locale | |||
77 | - locale::facet::_S_lc_ctype_c_locale(__c_locale, const char*) | |||
78 | - { return __c_locale(); } | |||
79 | + locale::facet::_S_lc_ctype_c_locale(__c_locale __cloc, const char* __s) | |||
80 | + { | |||
81 | + __c_locale __dup = (__c_locale)duplocale((locale_t)__cloc); | |||
82 | + if (__dup == __c_locale(0)) | |||
83 | + __throw_runtime_error(__N("locale::facet::_S_lc_ctype_c_locale " | |||
84 | + "duplocale error")); | |||
85 | + __c_locale __changed = (__c_locale)newlocale(LC_CTYPE_MASK, __s, | |||
86 | + (locale_t)__dup); | |||
87 | + if (__changed == __c_locale(0)) | |||
88 | + { | |||
89 | + freelocale((locale_t)__dup); | |||
90 | + __throw_runtime_error(__N("locale::facet::_S_lc_ctype_c_locale " | |||
91 | + "newlocale error")); | |||
92 | + } | |||
93 | + return __changed; | |||
94 | + } | |||
95 | ||||
96 | _GLIBCXX_END_NAMESPACE_VERSION | |||
97 | } // namespace | |||
98 | --- libstdc++-v3/config/os/bsd/dragonfly/os_defines.h.orig | |||
99 | +++ libstdc++-v3/config/os/bsd/dragonfly/os_defines.h | |||
100 | @@ -29,4 +29,9 @@ | |||
101 | // System-specific #define, typedefs, corrections, etc, go here. This | |||
102 | // file will come before all others. | |||
103 | ||||
104 | +#define _GLIBCXX_USE_C99_CHECK 1 | |||
105 | +#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999)) | |||
106 | +#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1 | |||
107 | +#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED) | |||
108 | + | |||
109 | #endif | |||
1 | --- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig | 110 | --- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig | |
2 | +++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h | 111 | +++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h | |
3 | @@ -43,9 +43,22 @@ | 112 | @@ -43,9 +43,22 @@ | |
4 | 113 | |||
5 | // NB: Offsets into ctype<char>::_M_table force a particular size | 114 | // NB: Offsets into ctype<char>::_M_table force a particular size | |
6 | // on the mask type. Because of this, we don't use an enum. | 115 | // on the mask type. Because of this, we don't use an enum. | |
7 | - typedef unsigned char mask; | 116 | - typedef unsigned char mask; | |
8 | 117 | |||
9 | -#ifndef _CTYPE_U | 118 | -#ifndef _CTYPE_U | |
10 | +#if defined(_CTYPE_BL) | 119 | +#if defined(_CTYPE_BL) | |
11 | + typedef unsigned short mask; | 120 | + typedef unsigned short mask; | |
12 | + static const mask upper = _CTYPE_U; | 121 | + static const mask upper = _CTYPE_U; | |
13 | + static const mask lower = _CTYPE_L; | 122 | + static const mask lower = _CTYPE_L; | |
@@ -90,23 +199,23 @@ | @@ -90,23 +199,23 @@ | |||
90 | --- libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h.orig | 199 | --- libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h.orig | |
91 | +++ libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h | 200 | +++ libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h | |
92 | @@ -48,7 +48,7 @@ | 201 | @@ -48,7 +48,7 @@ | |
93 | is(const char* __low, const char* __high, mask* __vec) const | 202 | is(const char* __low, const char* __high, mask* __vec) const | |
94 | { | 203 | { | |
95 | while (__low < __high) | 204 | while (__low < __high) | |
96 | - *__vec++ = _M_table[*__low++]; | 205 | - *__vec++ = _M_table[*__low++]; | |
97 | + *__vec++ = _M_table[(unsigned char)*__low++]; | 206 | + *__vec++ = _M_table[(unsigned char)*__low++]; | |
98 | return __high; | 207 | return __high; | |
99 | } | 208 | } | |
100 | 209 | |||
101 | --- libstdc++-v3/configure.host.orig | 210 | --- libstdc++-v3/configure.host.orig | |
102 | +++ libstdc++-v3/configure.host | 211 | +++ libstdc++-v3/configure.host | |
103 | @@ -268,6 +268,9 @@ | 212 | @@ -270,6 +270,9 @@ | |
104 | dragonfly*) | 213 | dragonfly*) | |
105 | os_include_dir="os/bsd/dragonfly" | 214 | os_include_dir="os/bsd/dragonfly" | |
106 | ;; | 215 | ;; | |
107 | + linux-androideabi) | 216 | + linux-androideabi) | |
108 | + os_include_dir="os/bionic" | 217 | + os_include_dir="os/bionic" | |
109 | + ;; | 218 | + ;; | |
110 | freebsd*) | 219 | freebsd*) | |
111 | os_include_dir="os/bsd/freebsd" | 220 | os_include_dir="os/bsd/freebsd" | |
112 | ;; | 221 | ;; |
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | --- libstdc++-v3/testsuite/lib/libstdc++.exp.orig | 1 | --- libstdc++-v3/testsuite/lib/libstdc++.exp.orig | |
2 | +++ libstdc++-v3/testsuite/lib/libstdc++.exp | 2 | +++ libstdc++-v3/testsuite/lib/libstdc++.exp | |
3 | @@ -898,17 +898,18 @@ | 3 | @@ -902,17 +902,18 @@ | |
4 | set f [open $src "w"] | 4 | set f [open $src "w"] | |
5 | puts $f "#include <locale>" | 5 | puts $f "#include <locale>" | |
6 | puts $f "#include <cstdio>" | 6 | puts $f "#include <cstdio>" | |
7 | - puts $f "using namespace std;" | 7 | - puts $f "using namespace std;" | |
8 | + puts $f "using namespace std;" | 8 | + puts $f "using namespace std;" | |
9 | puts $f "int main (int argc, char** argv)" | 9 | puts $f "int main (int argc, char** argv)" | |
10 | puts $f "{" | 10 | puts $f "{" | |
11 | + puts $f " const char* mlx = *(argv + 1);" | 11 | + puts $f " const char* mlx = *(argv + 1);" | |
12 | puts $f " try" | 12 | puts $f " try" | |
13 | puts $f " {" | 13 | puts $f " {" | |
14 | - puts $f " locale(*(argv + 1));" | 14 | - puts $f " locale(*(argv + 1));" | |
15 | + puts $f " locale((char*)(mlx));" | 15 | + puts $f " locale((char*)(mlx));" | |
16 | puts $f " return 0;" | 16 | puts $f " return 0;" |
@@ -1,38 +1,38 @@ | @@ -1,38 +1,38 @@ | |||
1 | --- libgfortran/acinclude.m4.orig | 1 | --- libgfortran/acinclude.m4.orig | |
2 | +++ libgfortran/acinclude.m4 | 2 | +++ libgfortran/acinclude.m4 | |
3 | @@ -100,7 +100,7 @@ | 3 | @@ -100,7 +100,7 @@ | |
4 | [Define to 1 if the target supports #pragma weak]) | 4 | [Define to 1 if the target supports #pragma weak]) | |
5 | fi | 5 | fi | |
6 | case "$host" in | 6 | case "$host" in | |
7 | - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) | 7 | - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) | |
8 | + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-netbsd* ) | 8 | + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-netbsd* ) | |
9 | AC_DEFINE(GTHREAD_USE_WEAK, 0, | 9 | AC_DEFINE(GTHREAD_USE_WEAK, 0, | |
10 | [Define to 0 if the target shouldn't use #pragma weak]) | 10 | [Define to 0 if the target shouldn't use #pragma weak]) | |
11 | ;; | 11 | ;; | |
12 | --- libgfortran/configure.orig | 12 | --- libgfortran/configure.orig | |
13 | +++ libgfortran/configure | 13 | +++ libgfortran/configure | |
14 | @@ -26447,7 +26447,7 @@ | 14 | @@ -26456,7 +26456,7 @@ | |
15 | 15 | |||
16 | fi | 16 | fi | |
17 | case "$host" in | 17 | case "$host" in | |
18 | - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) | 18 | - *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) | |
19 | + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-netbsd* ) | 19 | + *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-netbsd* ) | |
20 | 20 | |||
21 | $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h | 21 | $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h | |
22 | 22 | |||
23 | --- gcc/fortran/f95-lang.c.orig | 23 | --- gcc/fortran/f95-lang.c.orig | |
24 | +++ gcc/fortran/f95-lang.c | 24 | +++ gcc/fortran/f95-lang.c | |
25 | @@ -776,10 +776,17 @@ | 25 | @@ -777,10 +777,17 @@ | |
26 | 26 | |||
27 | gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble, | 27 | gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble, | |
28 | BUILT_IN_CABSL, "cabsl", ATTR_CONST_NOTHROW_LEAF_LIST); | 28 | BUILT_IN_CABSL, "cabsl", ATTR_CONST_NOTHROW_LEAF_LIST); | |
29 | +#if defined(__NetBSD__) | 29 | +#if defined(__NetBSD__) | |
30 | + gfc_define_builtin ("__builtin_cabs", func_cdouble_double, | 30 | + gfc_define_builtin ("__builtin_cabs", func_cdouble_double, | |
31 | + BUILT_IN_CABS, "__c99_cabs", ATTR_CONST_NOTHROW_LEAF_LIST); | 31 | + BUILT_IN_CABS, "__c99_cabs", ATTR_CONST_NOTHROW_LEAF_LIST); | |
32 | + gfc_define_builtin ("__builtin_cabsf", func_cfloat_float, | 32 | + gfc_define_builtin ("__builtin_cabsf", func_cfloat_float, | |
33 | + BUILT_IN_CABSF, "__c99_cabsf", ATTR_CONST_NOTHROW_LEAF_LIST); | 33 | + BUILT_IN_CABSF, "__c99_cabsf", ATTR_CONST_NOTHROW_LEAF_LIST); | |
34 | +#else | 34 | +#else | |
35 | gfc_define_builtin ("__builtin_cabs", func_cdouble_double, | 35 | gfc_define_builtin ("__builtin_cabs", func_cdouble_double, | |
36 | BUILT_IN_CABS, "cabs", ATTR_CONST_NOTHROW_LEAF_LIST); | 36 | BUILT_IN_CABS, "cabs", ATTR_CONST_NOTHROW_LEAF_LIST); | |
37 | gfc_define_builtin ("__builtin_cabsf", func_cfloat_float, | 37 | gfc_define_builtin ("__builtin_cabsf", func_cfloat_float, | |
38 | BUILT_IN_CABSF, "cabsf", ATTR_CONST_NOTHROW_LEAF_LIST); | 38 | BUILT_IN_CABSF, "cabsf", ATTR_CONST_NOTHROW_LEAF_LIST); |