On Tue, Mar 26, 2013 at 04:09:33PM +0100, Pascal Stumpf wrote:
> On Tue, 26 Mar 2013 15:47:45 +0100, Pascal Stumpf wrote:
> > So here's the final version of GCC 4.8.0.  Tested by me on amd64, i386,
> > powerpc and by jsg some time ago on hppa.  sparc64 hasn't been tested
> > yet, so it's disabled for now.  Needless to say, it would be cool if
> > someone could try that out, as well as hppa again and maybe alpha.  I
> > haven't merged the mips64(el) backend patches yet, but I'll do that
> > together with bcallah@ as soon as binutils 2.17 is ready on those archs.
> > 
> > -java works, and I've merged kurt@'s patches from 4.6.  The resulting
> > gcj can compile classpath and pdftk.  Also added support for -java on
> > powerpc.
> > 
> > Disabled -faggressive-loop-optimizations.  It breaks SPEC.
> > 
> > The compiler is now written in C++.  This means that adastrap must now
> > also contain the c++ part of GCC.
> > 
> > PIC/no-PIC bullshit is no more (yay).
> > 
> > I hope plists are correct.  Updating this port without a working
> > update-plist is a real PITA.
> 
> Aand of course I just found a small problem: move ${CONFIG]-e[gc]++ to
> PLIST-c++.

I've so far only looked at the Ada stuff, which is OK by me (lets commit
this, nothing depends on it and it's not going to get better outside the
tree)

Changes to the tarball:
- Bundle libm as in 4.7
- Remove USE_LIBTOOL, default now.
- Point to strip, which failed before because our install(1) is silly.
  This decreases adastrap size by ~15MB (!!)
- FULLPKGNAME otherwise it blows up as soon as REVISION is set.
- Install with -j1 as done with others, parallel building seems fine
  with 6 and 12 cores here.
- Drop messing with the -O flags, it seems a little cargo-cultish by now
  and I could observe no negative effect.
- -lpthread as done elsewhere

I'm not really happy about the "e" prefix to the gnat tools, but that
seems the direction they're going. Dropping that would require to
bring back a lot of patches which is also annoying, so.. such is life.

diff --git a/lang/gcc/4.8/Makefile b/lang/gcc/4.8/Makefile
index d345ea6..4685341 100644
--- a/lang/gcc/4.8/Makefile
+++ b/lang/gcc/4.8/Makefile
@@ -6,10 +6,12 @@ V = 4.8.0
 FULL_VERSION = $V
 FULL_PKGVERSION = $V
 
-ADASTRAP_LIBC-i386 = 66.2
-ADASTRAP-i386 = adastrap-i386-$V-0.tar.xz
-ADASTRAP_LIBC-amd64 = 66.2
-ADASTRAP-amd64 = adastrap-amd64-$V-0.tar.xz
+ADASTRAP_LIBC-i386 = 67.0
+ADASTRAP_LIBM-i386 = 8.0
+ADASTRAP-i386 = adastrap-i386-$V-1.tar.xz
+ADASTRAP_LIBC-amd64 = 67.0
+ADASTRAP_LIBM-amd64 = 8.0
+ADASTRAP-amd64 = adastrap-amd64-$V-1.tar.xz
 
 PKGNAME-main =  gcc-${FULL_PKGVERSION}
 PKGNAME-c++ =   g++-${FULL_PKGVERSION}
@@ -60,8 +62,6 @@ ECJ =         ecj-4.5.jar
 SUPDISTFILES = ${ADASTRAP-amd64}:0 ${ADASTRAP-i386}:0 ${ECJ}:1
 EXTRACT_ONLY = ${DISTNAME}.tar.bz2
 
-USE_LIBTOOL =  Yes
-
 BUILD_DEPENDS +=       devel/bison \
                        devel/libexecinfo
 
@@ -110,6 +110,7 @@ MODGNU_CONFIG_GUESS_DIRS =  ${WRKSRC} ${WRKSRC}/gcc
 EXTRA_ENV += am_cv_func_iconv=no JAR=no
 EXTRA_ENV += ac_cv_prog_M4=/usr/bin/m4
 EXTRA_ENV += ac_cv_header_magic_h=no
+EXTRA_ENV += STRIP=/usr/bin/strip
 MAKE_FLAGS +=   ac_cv_path_mkdir=/bin/mkdir
 
 CONFIGURE_ENV += ${EXTRA_ENV}
@@ -253,22 +254,35 @@ post-install:
 
 .include <bsd.port.mk>
 
-ADA_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${PKGNAME-ada}.tgz
-GCC_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${PKGNAME-main}.tgz
-GXX_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${PKGNAME-c++}.tgz
+ADA_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-ada}.tgz
+GCC_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-main}.tgz
+GXX_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-c++}.tgz
 
 adastrap: ${ADA_PACKAGE} ${GCC_PACKAGE} ${GXX_PACKAGE}
-.if !defined(ADASTRAP_LIBC-${MACHINE_ARCH})
-       @echo 1>&2 "Error: you must specify a libc to bundle"
+.if !defined(ADASTRAP_LIBC-${MACHINE_ARCH}) || \
+       !defined(ADASTRAP_LIBM-${MACHINE_ARCH})
+       @echo 1>&2 "Error: you must specify libc and libm to bundle"
        @exit 1
 .else
        mkdir -p ${WRKDIR}/prepare/bootstrap/system-libs
        cp /usr/lib/libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} \
                ${WRKDIR}/prepare/bootstrap/system-libs
+       cp /usr/lib/libm.so.${ADASTRAP_LIBM-${MACHINE_ARCH}} \
+               ${WRKDIR}/prepare/bootstrap/system-libs
        cd ${WRKDIR}/prepare/bootstrap && tar zxf ${ADA_PACKAGE}
        cd ${WRKDIR}/prepare/bootstrap && tar zxf ${GCC_PACKAGE}
        cd ${WRKDIR}/prepare/bootstrap && tar zxf ${GXX_PACKAGE}
-       rm -rf ${WRKDIR}/prepare/bootstrap/{+*,info,man}
+       rm -rf ${WRKDIR}/prepare/bootstrap/{+*,info,man,share}
+       if ! ldd ${WRKDIR}/prepare/bootstrap/bin/egcc | \
+               fgrep libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} >/dev/null; then 
\
+               echo 1>&2 "Error: adastrap egcc linked against unbundled libc"; 
\
+               exit 1; \
+       fi
+       if ! ldd ${WRKDIR}/prepare/bootstrap/bin/egcc | \
+               fgrep libm.so.${ADASTRAP_LIBM-${MACHINE_ARCH}} >/dev/null; then 
\
+               echo 1>&2 "Error: adastrap egcc linked against unbundled libm"; 
\
+               exit 1; \
+       fi
        cd ${WRKDIR}/prepare && tar cf - bootstrap | \
                xz > ${FULLDISTDIR}/${ADASTRAP-${MACHINE_ARCH}}
 .endif
diff --git a/lang/gcc/4.8/distinfo b/lang/gcc/4.8/distinfo
index d2dffc5..c209276 100644
--- a/lang/gcc/4.8/distinfo
+++ b/lang/gcc/4.8/distinfo
@@ -1,8 +1,8 @@
-SHA256 (gcc/adastrap-amd64-4.8.0-0.tar.xz) = 
1QK4PpoJv7WLjBG3Eq++bJgGAXNu16aVVFZejLtZF3A=
-SHA256 (gcc/adastrap-i386-4.8.0-0.tar.xz) = 
tH7ZGG8Z7xnLC0wMZQM43I3s3bTKqoSQ7EBVyeWXBQs=
+SHA256 (gcc/adastrap-amd64-4.8.0-1.tar.xz) = 
8zqPYBYcNX913KeXrRlg37VHLuPGnssCCob4Fc51hNg=
+SHA256 (gcc/adastrap-i386-4.8.0-1.tar.xz) = 
HoPDSgf0fCHyyKknoxThnFgxWZ0T3mdSiXBomEEH5m4=
 SHA256 (gcc/ecj-4.5.jar) = mP0Sjx03TZ5C/Z1INr3SScbVEevGwN8X+8G535bD14E=
 SHA256 (gcc/gcc-4.8.0.tar.bz2) = sDf+UTK3HsrS6nFB7JIpK10yQnv5D9kM3kMrHVq6zCw=
-SIZE (gcc/adastrap-amd64-4.8.0-0.tar.xz) = 46259948
-SIZE (gcc/adastrap-i386-4.8.0-0.tar.xz) = 41685068
+SIZE (gcc/adastrap-amd64-4.8.0-1.tar.xz) = 31996808
+SIZE (gcc/adastrap-i386-4.8.0-1.tar.xz) = 30038792
 SIZE (gcc/ecj-4.5.jar) = 1470676
 SIZE (gcc/gcc-4.8.0.tar.bz2) = 86663646
diff --git a/lang/gcc/4.8/patches/patch-Makefile_in 
b/lang/gcc/4.8/patches/patch-Makefile_in
index bf8ebb3..06588f0 100644
--- a/lang/gcc/4.8/patches/patch-Makefile_in
+++ b/lang/gcc/4.8/patches/patch-Makefile_in
@@ -1,6 +1,15 @@
 $OpenBSD: patch-Makefile_in,v 1.2 2012/07/01 18:56:45 pascal Exp $
---- Makefile.in.orig   Thu Dec 20 20:17:53 2012
-+++ Makefile.in        Sat Jan 12 13:27:06 2013
+--- Makefile.in.orig   Mon Jan 14 17:15:21 2013
++++ Makefile.in        Sun Apr  7 17:35:19 2013
+@@ -2343,7 +2343,7 @@ install:
+       @: $(MAKE); $(unstage)
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+-      $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target
++      $(MAKE) $(RECURSE_FLAGS_TO_PASS) -j1 installdirs install-host 
install-target
+ 
+ .PHONY: install-host-nogcc
+ install-host-nogcc:  \
 @@ -2634,7 +2634,7 @@ configure-build-libiberty: 
        srcdiroption="--srcdir=$${topdir}/libiberty"; \
        libsrcdir="$$s/libiberty"; \
diff --git a/lang/gcc/4.8/patches/patch-gcc_ada_gcc-interface_Makefile_in 
b/lang/gcc/4.8/patches/patch-gcc_ada_gcc-interface_Makefile_in
index 30e3946..8bf61c4 100644
--- a/lang/gcc/4.8/patches/patch-gcc_ada_gcc-interface_Makefile_in
+++ b/lang/gcc/4.8/patches/patch-gcc_ada_gcc-interface_Makefile_in
@@ -1,31 +1,10 @@
 $OpenBSD: patch-gcc_ada_gcc-interface_Makefile_in,v 1.2 2012/07/01 18:56:45 
pascal Exp $
 --- gcc/ada/gcc-interface/Makefile.in.orig     Wed Feb  6 12:19:08 2013
-+++ gcc/ada/gcc-interface/Makefile.in  Tue Mar  5 19:45:41 2013
-@@ -103,13 +103,13 @@ MAKEINFO = makeinfo
- TEXI2DVI = texi2dvi
- TEXI2PDF = texi2pdf
- GNATBIND_FLAGS = -static -x
--ADA_CFLAGS =
-+ADA_CFLAGS = -O1
- ADAFLAGS = -W -Wall -gnatpg -gnata
- FORCE_DEBUG_ADAFLAGS = -g
- NO_SIBLING_ADAFLAGS = -fno-optimize-sibling-calls
- NO_REORDER_ADAFLAGS = -fno-toplevel-reorder
- GNATLIBFLAGS = -W -Wall -gnatpg -nostdinc
--GNATLIBCFLAGS = -g -O2
-+GNATLIBCFLAGS = -g -O1
- PICFLAG_FOR_TARGET = @PICFLAG_FOR_TARGET@
- 
- # Pretend that _Unwind_GetIPInfo is available for the target by default.  This
-@@ -1328,6 +1328,58 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(o
++++ gcc/ada/gcc-interface/Makefile.in  Sun Apr  7 17:02:16 2013
+@@ -1333,6 +1333,58 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(o
+   MISCLIB = -lutil
+ endif
  
-   EH_MECHANISM=-gcc
-   THREADSLIB= -lpthread
-+  GMEM_LIB = gmemlib
-+  LIBRARY_VERSION := $(LIB_VERSION)
-+  MISCLIB = -lutil
-+endif
-+
 +ifeq ($(strip $(filter-out %86 openbsd%,$(arch) $(osys))),)
 +  LIBGNAT_TARGET_PAIRS = \
 +  a-intnam.ads<a-intnam-freebsd.ads \
@@ -46,7 +25,7 @@ $OpenBSD: patch-gcc_ada_gcc-interface_Makefile_in,v 1.2 
2012/07/01 18:56:45 pasc
 +  GNATLIB_SHARED = gnatlib-shared-dual
 +
 +  EH_MECHANISM=-gcc
-+  THREADSLIB= -pthread
++  THREADSLIB= -lpthread
 +  GMEM_LIB = gmemlib
 +  LIBRARY_VERSION := $(LIB_VERSION)
 +  MISCLIB = -lutil
@@ -72,7 +51,12 @@ $OpenBSD: patch-gcc_ada_gcc-interface_Makefile_in,v 1.2 
2012/07/01 18:56:45 pasc
 +  GNATLIB_SHARED = gnatlib-shared-dual
 +
 +  EH_MECHANISM=-gcc
-+  THREADSLIB= -pthread
-   GMEM_LIB = gmemlib
-   LIBRARY_VERSION := $(LIB_VERSION)
-   MISCLIB = -lutil
++  THREADSLIB= -lpthread
++  GMEM_LIB = gmemlib
++  LIBRARY_VERSION := $(LIB_VERSION)
++  MISCLIB = -lutil
++endif
++
+ # S390 Linux
+ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
+   LIBGNAT_TARGET_PAIRS_COMMON = \

Reply via email to