Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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**)'
- Loading branch information
maya
committed
Sep 25, 2016
1 parent
ee15e99
commit 7b6e029
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }, |