pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/gcc5 lang/gcc5: add patch to avoid declaring a pr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/51b463c21c69
branches:  trunk
changeset: 353127:51b463c21c69
user:      maya <maya%pkgsrc.org@localhost>
date:      Fri Sep 30 04:06:07 2016 +0000

description:
lang/gcc5: add patch to avoid declaring a prototype of host_detect_local_cpu
on platforms which do not include driver-arm.o in gcc/config.host, and do
not have this function. such as netbsd/arm.

an alternative would be to add driver-arm.o for the netbsd/arm case too, but
it would be diverging from netbsd base gcc, and /proc/cpuinfo which is needed
for this function to do anything useful is empty at least on my machine.

(I still can't complete a build on ARM)

diffstat:

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

diffs (41 lines):

diff -r 4d2a482f5262 -r 51b463c21c69 lang/gcc5/distinfo
--- a/lang/gcc5/distinfo        Thu Sep 29 20:11:08 2016 +0000
+++ b/lang/gcc5/distinfo        Fri Sep 30 04:06:07 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2016/09/28 14:39:00 maya Exp $
+$NetBSD: distinfo,v 1.13 2016/09/30 04:06:07 maya Exp $
 
 SHA1 (gcc-5.4.0.tar.bz2) = 07524df2b4ab9070bad9c49ab668da72237b8115
 RMD160 (gcc-5.4.0.tar.bz2) = 7ae3413ca7e90bb21e65e637c02ddf2b675b45f4
@@ -11,6 +11,7 @@
 SHA1 (patch-gcc_Makefile.in) = b2bceb34537de1cf704f18a59aa4e4d4a4551c62
 SHA1 (patch-gcc_config.gcc) = 84fedf863c853c40bf81884f5db3617200f0d31d
 SHA1 (patch-gcc_config.host) = 1b1e11cd199eb93f49443d51c0063b09b7327858
+SHA1 (patch-gcc_config_arm_arm.h) = 769a4939c0601d4f24ecff4374538b3a388e6013
 SHA1 (patch-gcc_config_host-netbsd.c) = 765295f07edb8a68f1910e3a9b4dd2a7dcd491a5
 SHA1 (patch-gcc_config_netbsd-protos.h) = 6d28864b4ccc8c1a63fe28e43601b84b63a00633
 SHA1 (patch-gcc_config_netbsd-stdint.h) = 025fc883101a187e84ed4c0772406720d645d550
diff -r 4d2a482f5262 -r 51b463c21c69 lang/gcc5/patches/patch-gcc_config_arm_arm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc5/patches/patch-gcc_config_arm_arm.h      Fri Sep 30 04:06:07 2016 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-gcc_config_arm_arm.h,v 1.1 2016/09/30 04:06:07 maya Exp $
+
+needs host_extra_gcc_objs="driver-arm.o" in gcc/config.host.
+otherwise you get an error:
+undefined reference to `host_detect_local_cpu(int, char const**)
+
+the function relies on /proc/cpuinfo to exist and provide useful
+information, and is used for -m{arch,tune,cpu}=native.
+
+--- gcc/config/arm/arm.h.orig  2016-03-29 13:28:34.000000000 +0000
++++ gcc/config/arm/arm.h
+@@ -2394,7 +2394,7 @@ extern const char *arm_rewrite_mcpu (int
+ 
+ /* -mcpu=native handling only makes sense with compiler running on
+    an ARM chip.  */
+-#if defined(__arm__)
++#if defined(__arm__) && (defined(__linux__) || defined(__FreeBSD__))
+ 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