uboot-ar71xx: fix compile on mac os x (patch from #9124)
SVN-Revision: 26676
This commit is contained in:
parent
e6350dee82
commit
6397aeb8b1
23
package/uboot-ar71xx/patches/021-darwin_compat.patch
Normal file
23
package/uboot-ar71xx/patches/021-darwin_compat.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
--- a/config.mk
|
||||||
|
+++ b/config.mk
|
||||||
|
@@ -64,9 +64,17 @@ HOSTSTRIP = strip
|
||||||
|
#
|
||||||
|
|
||||||
|
ifeq ($(HOSTOS),darwin)
|
||||||
|
-HOSTCC = cc
|
||||||
|
-HOSTCFLAGS += -traditional-cpp
|
||||||
|
-HOSTLDFLAGS += -multiply_defined suppress
|
||||||
|
+#get the major and minor product version (e.g. '10' and '6' for Snow Leopard)
|
||||||
|
+DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.')
|
||||||
|
+DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.')
|
||||||
|
+
|
||||||
|
+before-snow-leopard = $(shell if [ $(DARWIN_MAJOR_VERSION) -le 10 -a \
|
||||||
|
+ $(DARWIN_MINOR_VERSION) -le 5 ] ; then echo "$(1)"; else echo "$(2)"; fi ;)
|
||||||
|
+
|
||||||
|
+# Snow Leopards build environment has no longer restrictions as described above
|
||||||
|
+HOSTCC = $(call before-snow-leopard, "cc", "gcc")
|
||||||
|
+HOSTCFLAGS += $(call before-snow-leopard, "-traditional-cpp")
|
||||||
|
+HOSTLDFLAGS += $(call before-snow-leopard, "-multiply_defined suppress")
|
||||||
|
else
|
||||||
|
HOSTCC = gcc
|
||||||
|
endif
|
Loading…
Reference in New Issue
Block a user