pkgsrc-Users archive

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

cross/arm-none-eabi-gcc on arm



This is needed to compile u-boot natively in arm, but it fails to
compile because host_detect_local_cpu() is not defined for arm.
This workaround makes the trick.

Regards,
adr

--- gcc/config/arm/arm.h.orig   2018-03-22 17:24:41.000000000 +0000
+++ gcc/config/arm/arm.h
@@ -2195,19 +2195,19 @@ extern const char *arm_target_thumb_only

 /* -mcpu=native handling only makes sense with compiler running on
    an ARM chip.  */
-#if defined(__arm__)
-extern const char *host_detect_local_cpu (int argc, const char **argv);
-#define HAVE_LOCAL_CPU_DETECT
-# define MCPU_MTUNE_NATIVE_FUNCTIONS                   \
-  { "local_cpu_detect", host_detect_local_cpu },
-# define MCPU_MTUNE_NATIVE_SPECS                               \
-   " %{march=native:%<march=native %:local_cpu_detect(arch)}"  \
-   " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}"     \
-   " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
-#else
+//#if defined(__arm__)
+// extern const char *host_detect_local_cpu (int argc, const char **argv);
+//#define HAVE_LOCAL_CPU_DETECT
+//# define MCPU_MTUNE_NATIVE_FUNCTIONS                 \
+//  { "local_cpu_detect", host_detect_local_cpu },
+//# define MCPU_MTUNE_NATIVE_SPECS                             \
+//   " %{march=native:%<march=native %:local_cpu_detect(arch)}"        \
+//   " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}"   \
+//   " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
+//#else
 # define MCPU_MTUNE_NATIVE_FUNCTIONS
 # define MCPU_MTUNE_NATIVE_SPECS ""
-#endif
+//#endif

 const char *arm_canon_arch_option (int argc, const char **argv);



Home | Main Index | Thread Index | Old Index