Skip to content

Instantly share code, notes, and snippets.

@dileks
dileks / lll-project (llvm-linux with clang)
Created April 11, 2011 20:58
x86_32: Breakage in arch/x86/kernel/ptrace.c
[ build.log ]
...
CC arch/x86/kernel/ptrace.o
clang: warning: argument unused during compilation: '-freg-struct-return'
clang: warning: argument unused during compilation: '-mpreferred-stack-boundary=2'
clang: warning: argument unused during compilation: '-fno-optimize-sibling-calls'
arch/x86/kernel/ptrace.c:1350:17: error: function declared with with regparm(3) attribute was previously declared without the regparm attribute
asmregparm long
[ build.log ]
...
LD [M] drivers/gpu/drm/i915/i915.o
drivers/gpu/drm/i915/i915_dma.o: In function `intel_gmbus_is_forced_bit':
(.text+0x0): multiple definition of `intel_gmbus_is_forced_bit'
drivers/gpu/drm/i915/i915_drv.o:drivers/gpu/drm/i915/i915_drv.c:(.text+0x0): first defined here
drivers/gpu/drm/i915/i915_irq.o: In function `intel_gmbus_is_forced_bit':
drivers/gpu/drm/i915/i915_irq.c:(.text+0x0): multiple definition of `intel_gmbus_is_forced_bit'
drivers/gpu/drm/i915/i915_drv.o:drivers/gpu/drm/i915/i915_drv.c:(.text+0x0): first defined here
drivers/gpu/drm/i915/i915_mem.o: In function `intel_gmbus_is_forced_bit':
@dileks
dileks / lll-project (llvm-linux with clang)
Created April 11, 2011 22:19
x86, clang: Breakage with thinkpad_acpi
CC [M] drivers/platform/x86/thinkpad_acpi.o
clang: warning: argument unused during compilation: '-freg-struct-return'
clang: warning: argument unused during compilation: '-mpreferred-stack-boundary=2'
clang: warning: argument unused during compilation: '-fno-optimize-sibling-calls'
CC drivers/pci/pcie/aer/aerdrv_acpi.o
clang: warning: argument unused during compilation: '-freg-struct-return'
clang: warning: argument unused during compilation: '-mpreferred-stack-boundary=2'
clang: warning: argument unused during compilation: '-fno-optimize-sibling-calls'
CC [M] drivers/pci/hotplug/shpchp_hpc.o
clang: warning: argument unused during compilation: '-freg-struct-return'
@dileks
dileks / lll-project (llvm-linux with clang)
Created April 12, 2011 08:21
kernel-7121014768c6bb5ffca77e9666182e7a546a1c82: clang: error: unsupported option '-freg-struct-return'
$ LANG=C make CC=clang HOSTCC=clang KCFLAGS="-Qno-unused-arguments"
[: 1: Illegal number: 4.2.1
Makefile:604: "WARNING: Appending $KCFLAGS (-Qno-unused-arguments) from command line to kernel $CFLAGS"
CC kernel/bounds.s
clang: error: unsupported option '-freg-struct-return'
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
$ LANG=C make CC=clang HOSTCC=clang KCFLAGS="-Wno-unused-arguments"
[: 1: Illegal number: 4.2.1
@dileks
dileks / lll-project (llvm-linux with clang)
Created April 12, 2011 08:38
clang: error: unsupported option '-freg-struct-return'
$ clang --version
clang version 3.0 (https://github.com/lll-project/clang bd93bb8738e0313fe890e8159768a2dde250dc24)
Target: i386-pc-linux-gnu
Thread model: posix
$ LANG=C make CC='/opt/llvm/bin/clang -Wno-unused-arguments'
[: 1: Illegal number: 4.2.1
CC kernel/bounds.s
clang: error: unsupported option '-freg-struct-return'
make[1]: *** [kernel/bounds.s] Error 1
@dileks
dileks / lll-project (llvm-linux with clang)
Created April 12, 2011 08:48
-Wno-error-unused-arguments
$ LANG=C make CC=/opt/llvm/bin/clang HOSTCC=/opt/llvm/bin/clang KCFLAGS="-Wno-error-unused-arguments"
[: 1: Illegal number: 4.2.1
Makefile:604: "WARNING: Appending $KCFLAGS (-Wno-error-unused-arguments) from command line to kernel $CFLAGS"
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
CC kernel/bounds.s
clang: error: unsupported option '-freg-struct-return'
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
@dileks
dileks / lll-project (llvm-linux with clang)
Created April 12, 2011 08:50
-Wno-error-unused-arguments (take #2)
$ LANG=C make CC='/opt/llvm/bin/clang -Wno-error-unused-arguments' HOSTCC='/opt/llvm/bin/clang -Wno-error-unused-arguments'
[: 1: Illegal number: 4.2.1
HOSTCC scripts/basic/fixdep
warning: unknown warning option '-Wno-error-unused-arguments' [-Wunknown-warning-option]
1 warning generated.
HOSTCC scripts/basic/docproc
warning: unknown warning option '-Wno-error-unused-arguments' [-Wunknown-warning-option]
1 warning generated.
CC kernel/bounds.s
clang: error: unsupported option '-freg-struct-return'
@dileks
dileks / lll-project (llvm-linux with clang)
Created April 12, 2011 09:18
Whuzz up with... -Wno-unused-arguments and -Werror-unused-arguments
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 78720ed..7b6beb1 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -1026,10 +1026,10 @@ void Driver::BuildJobs(Compilation &C) const {
II);
}
- // If the user passed -Qunused-arguments or there were errors, don't warn
+ // If the user passed -Wno-unused-arguments or there were errors, don't warn
@dileks
dileks / lll-project (llvm-linux with clang)
Created April 12, 2011 09:20
LANG=C make V=1 CC=clang
$ LANG=C make V=1 CC=clang HOSTCC=clang
[: 1: Illegal number: 4.2.1
rm -f include/config/kernel.release
echo "2.6.38.2$(/bin/bash /home/sd/src/lll-project/kernel/scripts/setlocalversion /home/sd/src/lll-project/kernel)" > include/config/kernel.release
set -e; : ' CHK include/linux/version.h'; mkdir -p include/linux/; (echo \#define LINUX_VERSION_CODE 132646; echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) < /home/sd/src/lll-project/kernel/Makefile > include/linux/version.h.t
@dileks
dileks / lll-project (llvm-linux with clang)
Created April 12, 2011 09:59
arch/x86/kernel/acpi/realmode/wakemain.c:2:10: fatal error: 'boot.h' file not found
AS arch/x86/kernel/acpi/realmode/wakeup.o
clang: warning: argument unused during compilation: '-i/home/sd/src/lll-project/kernel/arch/x86/kernel/acpi/realmode/../../../boot'
CC arch/x86/kernel/acpi/realmode/wakemain.o
clang: warning: argument unused during compilation: '-i/home/sd/src/lll-project/kernel/arch/x86/kernel/acpi/realmode/../../../boot'
arch/x86/kernel/acpi/realmode/wakemain.c:2:10: fatal error: 'boot.h' file not found
#include "boot.h"
^
1 error generated.
make[4]: *** [arch/x86/kernel/acpi/realmode/wakemain.o] Fehler 1
make[3]: *** [arch/x86/kernel/acpi/realmode/wakeup.bin] Fehler 2