pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/gcc-aux lang/gcc-aux: Primarily add Solaris i386 ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7c985934d91f
branches: trunk
changeset: 634126:7c985934d91f
user: marino <marino%pkgsrc.org@localhost>
date: Fri May 09 09:50:47 2014 +0000
description:
lang/gcc-aux: Primarily add Solaris i386 and x86_64 targets
I was never able to build gcc-aux with multilib support when it was
based on gcc 4.7. It turns out that this is because Ada support for
multilib was broken per GCC's bugzilla. It's been fixed since. After
some significant effort and many hours, I finally produced a multilib
bootstrap for Solaris. It can produce other multilib compilers (x86-64)
and it can produce 32-bit only compilers (i386). This was tested on a
stock OmniOS x86-64 installation and the Joyent dev area (i386).
Solaris has not supported static linking since Solaris 9, so it is not
possible to create a static bootstrap like the BSDs have, nor is it
possible to build the compiler statically, so that option is disabled.
That means it is unlikely that the bootstrap will run on Solaris 10 or
Solaris 11, but this theory has not been tested.
Much of the changes to the diff-* patchsets are a result of OpenBSD work.
An OpenBSD static bootstrap has been created against devel/binutils, and
as a result it fails to find system libraries such as libc and libm. That
is a side note explaining the OpenBSD additions. There are some DragonFly
and NetBSD changes in the diff-* patches though.
The bootstrap target was significantly modified, mainly to capture the
special needs of creating a Solaris bootstrap. The creation of the
bootstrap tarball was put in it's own target. The zlib and math libraries
were connected to the bootstrap option. It's not a good idea to use
system zlib on Illumos because the zlib header is not guaranteed to be
installed.
The feature to rebuild the compiler with the installed gcc-aux was fixed;
it should use it's own c++ compiler instead of the system c++ compiler.
OpenBSD 5.5 does not support "cp -a", so this was changed to "cp -RpP" for
portability reasons.
diffstat:
lang/gcc-aux/Makefile | 88 +++++++++++++++++++++-----------
lang/gcc-aux/distinfo | 8 ++-
lang/gcc-aux/files/diff-ada | 41 +++++++++------
lang/gcc-aux/files/diff-core | 114 ++++++++++++++++++++++++++++++++++--------
lang/gcc-aux/files/diff-cxx | 15 +++++
lang/gcc-aux/options.mk | 31 ++++++++++-
6 files changed, 223 insertions(+), 74 deletions(-)
diffs (truncated from 647 to 300 lines):
diff -r e52ce9ae292b -r 7c985934d91f lang/gcc-aux/Makefile
--- a/lang/gcc-aux/Makefile Fri May 09 09:45:27 2014 +0000
+++ b/lang/gcc-aux/Makefile Fri May 09 09:50:47 2014 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.17 2014/05/02 15:54:16 marino Exp $
+# $NetBSD: Makefile,v 1.18 2014/05/09 09:50:47 marino Exp $
#
PKGNAME= gcc-aux-${SNAPSHOT}
DISTNAME= gcc-${GCC_VERSION}
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
DISTFILES= ${DISTNAME}.tar.bz2
@@ -28,10 +29,13 @@
FreeBSD-*-i386 \
FreeBSD-*-x86_64 \
NetBSD-[5-9]*-i386 \
- NetBSD-[5-9]*-x86_64
-
-# SunOS-5.1[1-9]*-i386
-# gnat-bootstrap.i386.solaris.tar.bz2
+ NetBSD-[5-9]*-x86_64 \
+ SunOS-5.1[1-9]*-i386 \
+ SunOS-5.1[1-9]*-x86_64
+# OpenBSD-*-amd64
+# OpenBSD-*-i386
+# MirBSD-*-amd64
+# MirBSD-*-i386
GARCH= ${MACHINE_ARCH:S/amd64/x86_64/}
BLD_TARGET= ${GARCH}-aux-${LOWER_OPSYS}${OS_VERSION}
@@ -52,7 +56,7 @@
. endif
.endif
-.if ${OPSYS} == "NetBSD"
+.if ${OPSYS} == NetBSD
.if !empty(OS_VERSION:M6.99.*)
NSUFF= 7.0_DEV
.else
@@ -61,28 +65,43 @@
.if ${GARCH} == i386
NELF= elf
.endif
+XLDF= -lm
BOOTSTRAP_COMPILER= ada-bootstrap.${GARCH}.netbsd.614.tar.bz2
BLD_TARGET= ${MACHINE_ARCH}-aux-netbsd${NELF}${NSUFF}
.endif
-.if ${OPSYS} == "SunOS"
-BOOTSTRAP_TRIPLET= i386-bootstrap-solaris5.11/4.6.1
-SOL_OSV= `expr substr ${OS_VERSION} 3 2`
+.if ${OPSYS} == SunOS
+SOL_OSV!= expr substr ${OS_VERSION} 3 2
BLD_TARGET= ${MACHINE_ARCH}-aux-${LOWER_OPSYS}2.${SOL_OSV}
-BOOTSTRAP_COMPILER= gnat-bootstrap.${MACHINE_ARCH}.solaris.tar.bz2
+BOOTSTRAP_COMPILER= ada-bootstrap.x86_64.solaris.511.tar.bz2
+. if ${ABI} == 64
+EXTRA_CONFARGS+= --enable-multilib
+. else
+COMPILER_ABI_SWITCH= -m32
+. endif
+MY_CONFIGURE_ENV+= OBJDUMP=${PREFIX}/bin/gobjdump
+MODERN_BINUTILS=x yes
+NATIVE_LINKER!= which ld
+.endif
+
+.if ${OPSYS} == OpenBSD || ${OPSYS} == MirBSD
MODERN_BINUTILS= yes
.endif
.if defined(MODERN_BINUTILS)
BUILDLINK_DEPMETHOD.binutils= full
.include "../../devel/binutils/buildlink3.mk"
-EXTRA_CONFARGS+= --with-gnu-ld --with-ld=${PREFIX}/bin/gld
EXTRA_CONFARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas
MY_CONFIGURE_ENV+= AR=${PREFIX}/bin/gar
MY_CONFIGURE_ENV+= AS=${PREFIX}/bin/gas
-MY_CONFIGURE_ENV+= LD=${PREFIX}/bin/gld
MY_CONFIGURE_ENV+= NM=${PREFIX}/bin/gnm
MY_CONFIGURE_ENV+= RANLIB=${PREFIX}/bin/granlib
+. if defined(NATIVE_LINKER)
+EXTRA_CONFARGS+= --without-gnu-ld --with-ld=${NATIVE_LINKER}
+. else
+EXTRA_CONFARGS+= --with-gnu-ld --with-ld=${PREFIX}/bin/gld
+MY_CONFIGURE_ENV+= LD=${PREFIX}/bin/gld
+. endif
.else
EXTRA_CONFARGS+= --with-gnu-ld --with-ld=/usr/bin/ld
EXTRA_CONFARGS+= --with-gnu-as --with-as=/usr/bin/as
@@ -104,6 +123,7 @@
# its gnatlink, gnatbind, and gnatmake rather than the older bootstrap versions
.if exists(${LOCALBASE}/gcc-aux/bin/ada)
FULL_GNATGCC=${LOCALBASE}/gcc-aux/bin/ada
+FULL_GNATGXX=${LOCALBASE}/gcc-aux/bin/g++
.endif
@@ -112,8 +132,8 @@
. if defined(BOOTSTRAP_TRIPLET)
FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gnatgcc
. else
-FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gcc
-FULL_GNATGXX=${BOOTSTRAP_PREFIX}/bin/g++
+FULL_GNATGCC=${BOOTSTRAP_PREFIX}/bin/gcc ${COMPILER_ABI_SWITCH}
+FULL_GNATGXX=${BOOTSTRAP_PREFIX}/bin/g++ ${COMPILER_ABI_SWITCH}
. endif
DISTFILES+= ${BOOTSTRAP_COMPILER}
SITES.${BOOTSTRAP_COMPILER}= http://downloads.dragonlace.net/src/
@@ -134,15 +154,16 @@
ada-bootstrap.x86_64.dragonfly.36A.tar.bz2 \
ada-bootstrap.x86_64.freebsd.84.tar.bz2 \
ada-bootstrap.x86_64.freebsd.100B.tar.bz2 \
- ada-bootstrap.x86_64.netbsd.614.tar.bz2
+ ada-bootstrap.x86_64.netbsd.614.tar.bz2 \
+ ada-bootstrap.x86_64.openbsd.55.tar.bz2 \
+ ada-bootstrap.x86_64.solaris.511.tar.bz2
.endif
-
# establish ada-aware compiler for use
-MY_CONFIGURE_ENV+= CC=${FULL_GNATGCC}
-MY_CONFIGURE_ENV+= CXX=${FULL_GNATGXX}
+MY_CONFIGURE_ENV+= CC=${FULL_GNATGCC:Q}
+MY_CONFIGURE_ENV+= CXX=${FULL_GNATGXX:Q}
MY_CONFIGURE_ENV+= PATH=${FULL_PATH}
-MY_CONFIGURE_ENV+= LDFLAGS="-lm ${COMPILER_RPATH_FLAG}${PREFIX}/lib"
+MY_CONFIGURE_ENV+= LDFLAGS="${XLDF} ${COMPILER_RPATH_FLAG}${PREFIX}/lib"
MY_MAKE_ENV+= PATH=${FULL_PATH}
MY_MAKE_ENV+= LD_LIBRARY_PATH=${BUILDDIR}/gcc${EXTRA_LLP}
# ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into
@@ -156,10 +177,6 @@
CONFIGURE_ARGS= --enable-languages=${LANGS:Q}
CONFIGURE_ARGS+= --build=${BLD_TARGET}
CONFIGURE_ARGS+= --prefix=${PKG_PREFIX:Q}
-CONFIGURE_ARGS+= --with-system-zlib
-CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp}
-CONFIGURE_ARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr}
-CONFIGURE_ARGS+= --with-mpc=${BUILDLINK_PREFIX.mpcomplex}
CONFIGURE_ARGS+= --enable-threads=posix
CONFIGURE_ARGS+= --disable-libmudflap
CONFIGURE_ARGS+= --disable-libgomp
@@ -193,10 +210,20 @@
-pe 's|es_MX|es_ES|g;' \
-pe 's|ru_RU.UTF8|ru_RU.UTF-8|g' ${LOCALE22FIX})
.if !empty(PKG_OPTIONS:Mstatic) || !empty(PKG_OPTIONS:Mbootstrap)
+. if ${OPSYS} != SunOS
# Ensure GNAT tools are built statically
${PERL5} -pi -e 's/^GCC_LINK_FLAGS=.*/GCC_LINK_FLAGS=-static/' \
${WRKSRC}/gcc/ada/gcc-interface/Makefile.in
+. endif
.endif
+.if !exists(${LOCALBASE}/gcc-aux/bin/ada) && ${OPSYS} == SunOS
+ # In case /usr/pkg/bin/gas doesn't exist, establish fallback
+ ${LN} -s ${PREFIX}/bin/gas ${BOOTSTRAP_PREFIX}/bin/as
+.endif
+ # Illumos /usr/ccs binaries are symlinked to /usr/bin
+ # elfdump was present on OmniOS but not in Joyent dev area
+ ${PERL5} -i -pe 's|/usr/ccs/bin|/usr/bin|g;' \
+ -pe 's|readelf -s|greadelf -s|' ${WRKSRC}/contrib/make_sunver.pl
# Update LINK_SPEC to add gcc-aux lib runpath in every binary
@${ECHO} "Configuring LINK_SPEC runpath"
${PERL5} -pi -e 's;\@PREFIX\@;${PREFIX};' \
@@ -234,7 +261,7 @@
do-test: build test-ada test-fortran test-objc test-cxx test-c
test-ada:
-.if (${OPSYS} == "NetBSD") && (${MACHINE_ARCH} == "x86_64")
+.if (${OPSYS} == NetBSD) && (${MACHINE_ARCH} == x86_64)
# NetBSD has an extremely small default stacksize of 2MB, which is
# insufficient for the gnat.dg testsuite.
# specifically: entry_queues test on AMD64
@@ -270,19 +297,18 @@
cd ${BUILDDIR} && ${SETENV} ${MY_MAKE_ENV} ${GMAKE} install-strip \
DESTDIR=${DESTDIR}
${MV} ${DESTDIR}${PKG_PREFIX}/share ${WRKDIR}/moved_share
+
.if !empty(PKG_OPTIONS:Mbootstrap)
+create-bootstrap: stage-install
${MKDIR} ${NEWBSDIR}
- ${CP} -a ${DESTDIR}${PKG_PREFIX}/bin ${NEWBSDIR}/
- ${CP} -a ${DESTDIR}${PKG_PREFIX}/lib ${NEWBSDIR}/
- ${CP} -a ${DESTDIR}${PKG_PREFIX}/include ${NEWBSDIR}/
- ${CP} -a ${DESTDIR}${PKG_PREFIX}/libexec ${NEWBSDIR}/
+ ${CP} -RpP ${DESTDIR}${PKG_PREFIX}/bin ${NEWBSDIR}/
+ ${CP} -RpP ${DESTDIR}${PKG_PREFIX}/lib ${NEWBSDIR}/
+ ${CP} -RpP ${DESTDIR}${PKG_PREFIX}/include ${NEWBSDIR}/
+ ${CP} -RpP ${DESTDIR}${PKG_PREFIX}/libexec ${NEWBSDIR}/
${RM} ${NEWBSDIR}/bin/${GARCH}*
${RM} -rf ${NEWBSDIR}/lib/gcc/${BLD_TARGET}/${GCC_VERSION}/include-fixed
(cd ${NEWBSDIR}/.. ; \
${TAR} -cf ${BSFILENAME} bootstrap; ${BZIP2} ${BSFILENAME})
.endif
-.include "../../devel/gmp/buildlink3.mk"
-.include "../../math/mpfr/buildlink3.mk"
-.include "../../math/mpcomplex/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r e52ce9ae292b -r 7c985934d91f lang/gcc-aux/distinfo
--- a/lang/gcc-aux/distinfo Fri May 09 09:45:27 2014 +0000
+++ b/lang/gcc-aux/distinfo Fri May 09 09:50:47 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2014/04/30 16:24:39 marino Exp $
+$NetBSD: distinfo,v 1.8 2014/05/09 09:50:47 marino Exp $
SHA1 (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = 7e0725889ae752e6a9fdbac5b1d2ef0e3f62822e
RMD160 (ada-bootstrap.i386.dragonfly.36A.tar.bz2) = f62c00515588804ce69368507822f30380d7e48d
@@ -24,6 +24,12 @@
SHA1 (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 683f58e6e394a508a52ec1dc5f3d9ca2869d5252
RMD160 (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 4574857089e82fb80725161cc8b625ce75f6810e
Size (ada-bootstrap.x86_64.netbsd.614.tar.bz2) = 39348972 bytes
+SHA1 (ada-bootstrap.x86_64.openbsd.55.tar.bz2) = 18ee97939bd95e70cfc5773eb4cfb075f22e50e6
+RMD160 (ada-bootstrap.x86_64.openbsd.55.tar.bz2) = 8563f665f52e13ae4a379ae71a183bb01470fb78
+Size (ada-bootstrap.x86_64.openbsd.55.tar.bz2) = 38753186 bytes
+SHA1 (ada-bootstrap.x86_64.solaris.511.tar.bz2) = abb16c1582e2a6ffe37df4afd96d04c44f2eea7b
+RMD160 (ada-bootstrap.x86_64.solaris.511.tar.bz2) = 41677e2fd0cb02c89f200fb97b112ad3be7f19cd
+Size (ada-bootstrap.x86_64.solaris.511.tar.bz2) = 60110383 bytes
SHA1 (gcc-4.9.0.tar.bz2) = fbde8eb49f2b9e6961a870887cf7337d31cd4917
RMD160 (gcc-4.9.0.tar.bz2) = ac561660744127fa009ae75202d1ac81ac8d7668
Size (gcc-4.9.0.tar.bz2) = 89677407 bytes
diff -r e52ce9ae292b -r 7c985934d91f lang/gcc-aux/files/diff-ada
--- a/lang/gcc-aux/files/diff-ada Fri May 09 09:45:27 2014 +0000
+++ b/lang/gcc-aux/files/diff-ada Fri May 09 09:50:47 2014 +0000
@@ -6994,7 +6994,7 @@
|| defined (__GLIBC__) || defined (__APPLE__)
eof_ch = termios_rec.c_cc[VEOF];
-@@ -853,8 +856,11 @@
+@@ -853,8 +856,12 @@
/* Darwin, Free BSD, Linux, where component tm_gmtoff is present in
struct tm */
@@ -7003,6 +7003,7 @@
+#elif defined (__APPLE__) \
+ || defined (__DragonFly__) \
+ || defined (__FreeBSD__) \
++ || defined (__OpenBSD__) \
+ || defined (linux) \
+ || defined (__GLIBC__)
{
@@ -7010,7 +7011,7 @@
*off = tp.tm_gmtoff;
--- /dev/null
+++ gcc/ada/system-dragonfly-x86.ads
-@@ -0,0 +1,143 @@
+@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
@@ -7145,6 +7146,7 @@
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
++ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
@@ -7156,7 +7158,7 @@
+end System;
--- /dev/null
+++ gcc/ada/system-dragonfly-x86_64.ads
-@@ -0,0 +1,143 @@
+@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
@@ -7291,6 +7293,7 @@
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
++ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
@@ -7302,7 +7305,7 @@
+end System;
--- /dev/null
+++ gcc/ada/system-netbsd-x86.ads
-@@ -0,0 +1,143 @@
+@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
@@ -7437,6 +7440,7 @@
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
++ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
@@ -7448,7 +7452,7 @@
+end System;
--- /dev/null
+++ gcc/ada/system-netbsd-x86_64.ads
-@@ -0,0 +1,143 @@
+@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
Home |
Main Index |
Thread Index |
Old Index