projects
/
comedi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10d390f
)
Linux-2.2 defines CC to be 'gcc -D__KERNEL__ -I$(HPATH)'. Hack a
author
David Schleef
<ds@schleef.org>
Sat, 15 Dec 2001 02:23:30 +0000
(
02:23
+0000)
committer
David Schleef
<ds@schleef.org>
Sat, 15 Dec 2001 02:23:30 +0000
(
02:23
+0000)
workaround.
scripts/linux_flags/Makefile
patch
|
blob
|
history
diff --git
a/scripts/linux_flags/Makefile
b/scripts/linux_flags/Makefile
index 9f02710d8c83afa6051ac5bead666e369a57cb33..c535794a8802219c0bb636263c1111a3ae9bfa02 100644
(file)
--- a/
scripts/linux_flags/Makefile
+++ b/
scripts/linux_flags/Makefile
@@
-13,7
+13,13
@@
modules:
echo ARFLAGS="$(ARFLAGS)" >>flags
echo CROSS_COMPILE="$(CROSS_COMPILE)" >>flags
echo KERNELRELEASE="$(KERNELRELEASE)" >>flags
+# This is evil Makefile hackery. Please look the other way.
+ifneq (,$(findstring __KERNEL__,$(CC)))
+ echo CFLAGS="$(wordlist 2,100,$(CC)) $(CFLAGS)" >>flags
+ echo CC=$(word 1,$(CC)) >>flags
+else
echo CC="$(CC)" >>flags
+endif
echo LD="$(LD)" >>flags
echo AS="$(AS)" >>flags