pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/gcc48 gcc48: fix build error on netbsd/arm



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d088450fc8eb
branches:  trunk
changeset: 353059:d088450fc8eb
user:      maya <maya%pkgsrc.org@localhost>
date:      Sun Sep 25 23:09:34 2016 +0000

description:
gcc48: fix build error on netbsd/arm

configs for gcc on netbsd don't build -march=native support, but this
stray prototype was left, causing build errors:

gcc.o:(.rodata+0x58c4): undefined reference to
`host_detect_local_cpu(int, char const**)'

diffstat:

 lang/gcc48/distinfo                           |   3 ++-
 lang/gcc48/patches/patch-gcc_config_arm_arm.h |  18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r 4b9792bcc75f -r d088450fc8eb lang/gcc48/distinfo
--- a/lang/gcc48/distinfo       Sun Sep 25 21:34:05 2016 +0000
+++ b/lang/gcc48/distinfo       Sun Sep 25 23:09:34 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2016/09/15 17:56:23 maya Exp $
+$NetBSD: distinfo,v 1.32 2016/09/25 23:09:34 maya Exp $
 
 SHA1 (ecj-4.5.jar) = 58c1d79c64c8cd718550f32a932ccfde8d1e6449
 RMD160 (ecj-4.5.jar) = d3f4da657f086b6423f74e93f001132f4855368a
@@ -29,6 +29,7 @@
 SHA1 (patch-gcc_c-family_c-format.c) = 485ebb16ff3c0c785678326ff4d622c865849850
 SHA1 (patch-gcc_config.gcc) = 1a697bcc295c40bc1bbed6295f53854d56df9f93
 SHA1 (patch-gcc_config.host) = 1b1e11cd199eb93f49443d51c0063b09b7327858
+SHA1 (patch-gcc_config_arm_arm.h) = 92887392b19018d20f015de78d16ce32f2986e7a
 SHA1 (patch-gcc_config_darwin.c) = caff312fbc948a1c2730decbab435dbd3caa203f
 SHA1 (patch-gcc_config_dragonfly-stdint.h) = 740dc819b446d5f1476506322c4b280ffdb5a6c0
 SHA1 (patch-gcc_config_dragonfly.h) = 82f549cdc7543b4bf413a44d481ef42b10f59c82
diff -r 4b9792bcc75f -r d088450fc8eb lang/gcc48/patches/patch-gcc_config_arm_arm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc48/patches/patch-gcc_config_arm_arm.h     Sun Sep 25 23:09:34 2016 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-gcc_config_arm_arm.h,v 1.1 2016/09/25 23:09:35 maya Exp $
+
+Don't declare a prototype used for -march=native, avoids build error on netbsd/arm:
+gcc.o:(.rodata+0x58c4): undefined reference to `host_detect_local_cpu(int, char const**)'
+
+same change is used in netbsd base gcc.
+
+--- gcc/config/arm/arm.h.orig  2015-01-14 11:02:24.000000000 +0000
++++ gcc/config/arm/arm.h
+@@ -2315,7 +2315,7 @@ extern int making_const_table;
+ 
+ /* -mcpu=native handling only makes sense with compiler running on
+    an ARM chip.  */
+-#if defined(__arm__)
++#if defined(__arm__) && !defined(__NetBSD__)
+ extern const char *host_detect_local_cpu (int argc, const char **argv);
+ # define EXTRA_SPEC_FUNCTIONS                                         \
+   { "local_cpu_detect", host_detect_local_cpu },



Home | Main Index | Thread Index | Old Index