pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/gcc5



Module Name:    pkgsrc
Committed By:   he
Date:           Fri Aug 25 16:33:54 UTC 2017

Modified Files:
        pkgsrc/lang/gcc5: Makefile distinfo
        pkgsrc/lang/gcc5/patches: patch-gcc_config.gcc
Added Files:
        pkgsrc/lang/gcc5/patches: patch-gcc_config_alpha_elf.h
            patch-gcc_config_alpha_linux.h

Log Message:
Add fixes for powerpc and alpha on NetBSD: ensure we have the
correct order of the include files, and use this also for i386 and
amd64 as well.  For alpha, move the Linux-specific settings into the
alpha/linux.h file.
Verified that this package now builds on powerpc.
This is largely the patches posted by maya@ on Jul 23, I just mirrored
the changes to include order to NetBSD/powerpc as well.  Thanks!
Bump PKGREVISION, bump to gcc5-libs to follow shortly.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/lang/gcc5/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/gcc5/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/gcc5/patches/patch-gcc_config.gcc
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc5/patches/patch-gcc_config_alpha_elf.h \
    pkgsrc/lang/gcc5/patches/patch-gcc_config_alpha_linux.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/gcc5/Makefile
diff -u pkgsrc/lang/gcc5/Makefile:1.22 pkgsrc/lang/gcc5/Makefile:1.23
--- pkgsrc/lang/gcc5/Makefile:1.22      Sat Jul 29 00:42:35 2017
+++ pkgsrc/lang/gcc5/Makefile   Fri Aug 25 16:33:53 2017
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2017/07/29 00:42:35 maya Exp $
+# $NetBSD: Makefile,v 1.23 2017/08/25 16:33:53 he Exp $
 
 GCC_PKGNAME=           gcc5
-PKGREVISION=           5
+PKGREVISION=           6
 .include               "version.mk"
 
 DISTNAME=      gcc-${GCC5_DIST_VERSION}

Index: pkgsrc/lang/gcc5/distinfo
diff -u pkgsrc/lang/gcc5/distinfo:1.15 pkgsrc/lang/gcc5/distinfo:1.16
--- pkgsrc/lang/gcc5/distinfo:1.15      Sat Jul 29 00:42:35 2017
+++ pkgsrc/lang/gcc5/distinfo   Fri Aug 25 16:33:53 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2017/07/29 00:42:35 maya Exp $
+$NetBSD: distinfo,v 1.16 2017/08/25 16:33:53 he Exp $
 
 SHA1 (gcc-5.4.0.tar.bz2) = 07524df2b4ab9070bad9c49ab668da72237b8115
 RMD160 (gcc-5.4.0.tar.bz2) = 7ae3413ca7e90bb21e65e637c02ddf2b675b45f4
@@ -9,8 +9,10 @@ RMD160 (isl-0.14.tar.bz2) = 4c69d026b515
 SHA512 (isl-0.14.tar.bz2) = 117c0c6f31d91a9284a8f54a748df6494ca2ac21507a45611e911403e9610579b9323ce624aea1de0b8089b3194e59d4364f01bdb71ddcf8f6c24c749d11c4b7
 Size (isl-0.14.tar.bz2) = 1399896 bytes
 SHA1 (patch-gcc_Makefile.in) = b2bceb34537de1cf704f18a59aa4e4d4a4551c62
-SHA1 (patch-gcc_config.gcc) = 84fedf863c853c40bf81884f5db3617200f0d31d
+SHA1 (patch-gcc_config.gcc) = 5e39c8d095b4d3bcd6d48dfb76bacdcd028bbe36
 SHA1 (patch-gcc_config.host) = 1b1e11cd199eb93f49443d51c0063b09b7327858
+SHA1 (patch-gcc_config_alpha_elf.h) = 53c55b37b39fe31d765e256910f80061a32479de
+SHA1 (patch-gcc_config_alpha_linux.h) = 3cb56095557c28119d58ae13d451ec4497c6f612
 SHA1 (patch-gcc_config_arm_arm.h) = 769a4939c0601d4f24ecff4374538b3a388e6013
 SHA1 (patch-gcc_config_host-netbsd.c) = 765295f07edb8a68f1910e3a9b4dd2a7dcd491a5
 SHA1 (patch-gcc_config_i386_i386.c) = 4bec843a876dd71d756ee757d69e4649a109bc64

Index: pkgsrc/lang/gcc5/patches/patch-gcc_config.gcc
diff -u pkgsrc/lang/gcc5/patches/patch-gcc_config.gcc:1.2 pkgsrc/lang/gcc5/patches/patch-gcc_config.gcc:1.3
--- pkgsrc/lang/gcc5/patches/patch-gcc_config.gcc:1.2   Wed Sep 28 14:39:00 2016
+++ pkgsrc/lang/gcc5/patches/patch-gcc_config.gcc       Fri Aug 25 16:33:54 2017
@@ -1,4 +1,73 @@
-$NetBSD: patch-gcc_config.gcc,v 1.2 2016/09/28 14:39:00 maya Exp $
+$NetBSD: patch-gcc_config.gcc,v 1.3 2017/08/25 16:33:54 he Exp $
+
+Make some adjustments to the NetBSD sections of this file,
+ensure include file order is correct also for alpha and powerpc,
+and do the same for i386 and amd64.
+
+--- gcc/config.gcc.orig        2014-11-21 16:04:20.000000000 +0000
++++ gcc/config.gcc
+@@ -744,10 +744,16 @@ case ${target} in
+   target_has_targetcm=yes
+   ;;
+ *-*-netbsd*)
+-  tmake_file="t-slibgcc"
++  use_gcc_stdint=wrap
++  tmake_file="t-slibgcc t-netbsd"
+   gas=yes
+   gnu_ld=yes
+ 
++  # cabs/cabsf are renamed to __c99_cabs/cabsf
++  tm_p_file="${tm_p_file} netbsd-protos.h"
++  target_gtfiles="${target_gtfiles} \$(srcdir)/config/netbsd.c"
++  extra_objs="${extra_objs} netbsd.o"
++
+   # NetBSD 2.0 and later get POSIX threads enabled by default.
+   # Allow them to be explicitly enabled on any other version.
+   case ${enable_threads} in
+@@ -772,6 +778,7 @@ case ${target} in
+       default_use_cxa_atexit=yes
+       ;;
+   esac
++  nbsd_tm_file="${nbsd_tm_file} netbsd.h netbsd-stdint.h netbsd-elf.h"
+   ;;
+ *-*-openbsd*)
+   tmake_file="t-openbsd"
+@@ -947,7 +954,7 @@ alpha*-*-freebsd*)
+       extra_options="${extra_options} alpha/elf.opt"
+       ;;
+ alpha*-*-netbsd*)
+-      tm_file="elfos.h ${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
++      tm_file="elfos.h ${tm_file} ${nbsd_tm_file} alpha/elf.h alpha/netbsd.h"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
+                      alpha/elf.opt"
+       ;;
+@@ -1399,12 +1406,14 @@ x86_64-*-freebsd*)
+       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"
+       ;;
+ i[34567]86-*-netbsdelf*)
+-      tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
++      tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h netbsd-stdint.h"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++      tmake_file="${tmake_file} i386/t-crtstuff"
+       ;;
+ x86_64-*-netbsd*)
+-      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"
++      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 netbsd-stdint.h"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
++      tmake_file="${tmake_file} i386/t-crtstuff"
+       ;;
+ i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
+       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"
+@@ -2291,7 +2300,7 @@ powerpc*-*-freebsd*)
+       esac
+       ;;
+ powerpc-*-netbsd*)
+-      tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
++      tm_file="${tm_file} ${nbsd_tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+       tmake_file="${tmake_file} rs6000/t-netbsd"
+       extra_options="${extra_options} rs6000/sysv4.opt"
+$NetBSD: patch-gcc_config.gcc,v 1.3 2017/08/25 16:33:54 he Exp $
 
 --- gcc/config.gcc.orig        2014-11-21 16:04:20.000000000 +0000
 +++ gcc/config.gcc

Added files:

Index: pkgsrc/lang/gcc5/patches/patch-gcc_config_alpha_elf.h
diff -u /dev/null pkgsrc/lang/gcc5/patches/patch-gcc_config_alpha_elf.h:1.1
--- /dev/null   Fri Aug 25 16:33:54 2017
+++ pkgsrc/lang/gcc5/patches/patch-gcc_config_alpha_elf.h       Fri Aug 25 16:33:54 2017
@@ -0,0 +1,39 @@
+$NetBSD: patch-gcc_config_alpha_elf.h,v 1.1 2017/08/25 16:33:54 he Exp $
+
+Move Linux-specific spec definitions to the linux file.
+
+--- work/gcc-5.4.0/gcc/config/alpha/elf.h.orig 2015-01-05 12:33:28.000000000 +0000
++++ work/gcc-5.4.0/gcc/config/alpha/elf.h
+@@ -100,32 +100,6 @@ do {                                                                      \
+     ASM_OUTPUT_DEF (FILE, alias, name);                               \
+   } while (0)
+ 
+-/* Provide a STARTFILE_SPEC appropriate for ELF.  Here we add the
+-   (even more) magical crtbegin.o file which provides part of the
+-   support for getting C++ file-scope static object constructed
+-   before entering `main'.  */
+-
+-#undef        STARTFILE_SPEC
+-#ifdef HAVE_LD_PIE
+-#define STARTFILE_SPEC \
+-  "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
+-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+-#else
+-#define STARTFILE_SPEC \
+-  "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
+-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+-#endif
+-
+-/* Provide a ENDFILE_SPEC appropriate for ELF.  Here we tack on the
+-   magical crtend.o file which provides part of the support for
+-   getting C++ file-scope static object constructed before entering
+-   `main', followed by a normal ELF "finalizer" file, `crtn.o'.  */
+-
+-#undef        ENDFILE_SPEC
+-#define ENDFILE_SPEC \
+-  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
+-   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+-
+ /* This variable should be set to 'true' if the target ABI requires
+    unwinding tables even when exceptions are not used.  */
+ #define TARGET_UNWIND_TABLES_DEFAULT true
Index: pkgsrc/lang/gcc5/patches/patch-gcc_config_alpha_linux.h
diff -u /dev/null pkgsrc/lang/gcc5/patches/patch-gcc_config_alpha_linux.h:1.1
--- /dev/null   Fri Aug 25 16:33:54 2017
+++ pkgsrc/lang/gcc5/patches/patch-gcc_config_alpha_linux.h     Fri Aug 25 16:33:54 2017
@@ -0,0 +1,39 @@
+$NetBSD: patch-gcc_config_alpha_linux.h,v 1.1 2017/08/25 16:33:54 he Exp $
+
+Move Linux-specific spec definitions to the Linux file.
+
+--- work/gcc-5.4.0/gcc/config/alpha/linux.h.orig       2015-01-05 12:33:28.000000000 +0000
++++ work/gcc-5.4.0/gcc/config/alpha/linux.h
+@@ -74,6 +74,32 @@ along with GCC; see the file COPYING3.  
+ 
+ #define TARGET_POSIX_IO
+ 
++/* Provide a STARTFILE_SPEC appropriate for ELF.  Here we add the
++   (even more) magical crtbegin.o file which provides part of the
++   support for getting C++ file-scope static object constructed
++   before entering `main'.  */
++ 
++#undef  STARTFILE_SPEC
++#ifdef HAVE_LD_PIE
++#define STARTFILE_SPEC \
++  "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
++   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++#else
++#define STARTFILE_SPEC \
++  "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
++   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++#endif
++ 
++/* Provide a ENDFILE_SPEC appropriate for ELF.  Here we tack on the
++   magical crtend.o file which provides part of the support for
++   getting C++ file-scope static object constructed before entering
++   `main', followed by a normal ELF "finalizer" file, `crtn.o'.  */
++ 
++#undef  ENDFILE_SPEC
++#define ENDFILE_SPEC \
++  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
++   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
++
+ #define LINK_GCC_C_SEQUENCE_SPEC \
+   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
+ 



Home | Main Index | Thread Index | Old Index