diff options
author | maya <maya@pkgsrc.org> | 2016-09-30 04:06:07 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2016-09-30 04:06:07 +0000 |
commit | 1fbd20fb6734d4f8d4bfa6e57a1e5d7e34886c9e (patch) | |
tree | 7a424a22fea5e7928a2bf1075e3c721f4cc30feb /lang/gcc5 | |
parent | a79275456b94398837f6b3741d05d5b55bdf35d4 (diff) | |
download | pkgsrc-1fbd20fb6734d4f8d4bfa6e57a1e5d7e34886c9e.tar.gz |
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 (limited to 'lang/gcc5')
-rw-r--r-- | lang/gcc5/distinfo | 3 | ||||
-rw-r--r-- | lang/gcc5/patches/patch-gcc_config_arm_arm.h | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/lang/gcc5/distinfo b/lang/gcc5/distinfo index 1948a67988f..6ca6defd55d 100644 --- a/lang/gcc5/distinfo +++ b/lang/gcc5/distinfo @@ -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 @@ Size (isl-0.14.tar.bz2) = 1399896 bytes 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 --git a/lang/gcc5/patches/patch-gcc_config_arm_arm.h b/lang/gcc5/patches/patch-gcc_config_arm_arm.h new file mode 100644 index 00000000000..1866f3f99f0 --- /dev/null +++ b/lang/gcc5/patches/patch-gcc_config_arm_arm.h @@ -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 }, \ |