3.6-rc1: twl4030 don't compile :(
CC drivers/power/twl4030_charger.odrivers/power/twl4030_charger.c:248:12: error: invalid suffix "b1100" on integer constant drivers/power/twl4030_charger.c:250:12: error: invalid suffix "b1000" on integer constant drivers/power/twl4030_charger.c:252:12: error: invalid suffix "b0100" on integer constant drivers/power/twl4030_charger.c:254:12: error: invalid suffix "b0000" on integer constant drivers/power/twl4030_charger.c:257:12: error: invalid suffix "b11" on integer constant drivers/power/twl4030_charger.c:259:12: error: invalid suffix "b10" on integer constant drivers/power/twl4030_charger.c:261:12: error: invalid suffix "b01" on integer constant drivers/power/twl4030_charger.c:263:12: error: invalid suffix "b00" on integer constant drivers/power/twl4030_charger.c:266:5: error: invalid suffix "b1100" on integer constant drivers/power/twl4030_charger.c:266:26: error: invalid suffix "b11" on integer constant make[2]: [drivers/power/twl4030_charger.o] Error 1 (ignored)
CC drivers/power/lp8727_charger.o CC drivers/power/gpio-charger.o CC drivers/power/charger-manager.o LD drivers/power/avs/built-in.o CC drivers/power/smb347-charger.o LD drivers/power/built-in.o
ld: drivers/power/twl4030_charger.o: No such file: No such file or directory make[2]: [drivers/power/built-in.o] Error 1 (ignored)
CC [M] drivers/power/ds2760_battery.o
.... that messed the whole compilation because the kernel didn't link :( :(
---
Professional hosting for everyone - http://www.host.ru
Hi,
Quoted 3 lines · werner
CC
drivers/power/twl4030_charger.odrivers/power/twl4030_charger.c:248:12: error: invalid suffix "b1100" on integer constant
drivers/power/twl4030_charger.c:
#define TWL4030_BBSEL_3V0 0b0100 #define TWL4030_BBSEL_3V1 0b1000 #define TWL4030_BBSEL_3V2 0b1100
Werner, your gcc version is too old to support the 0b-prefixed binary constant syntax. It was introduced in gcc-4.3. The kernel compiles fine here, on gcc-4.7.
Neil Brown added this use of the 0b prefix in 210d4bc8a3128e3e61ac3b ("twl4030_charger: Add backup-battery charging"). Neil, I don't think we can use this syntax yet -- Documentation/Changes says that we still support from gcc-3.2 onwards.
Thanks,
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Quoted 12 lines · On Fri, 03 Aug 2012 01:12:10 -0400 Chris Ball <[email protected]> wrote:
Hi,
Quoted 3 lines · werner
CC
drivers/power/twl4030_charger.odrivers/power/twl4030_charger.c:248:12: error: invalid suffix "b1100" on integer constant
drivers/power/twl4030_charger.c:#define TWL4030_BBSEL_3V0 0b0100 #define TWL4030_BBSEL_3V1 0b1000 #define TWL4030_BBSEL_3V2 0b1100
Quoted 8 lines
Werner, your gcc version is too old to support the 0b-prefixed binary constant syntax. It was introduced in gcc-4.3. The kernel compiles fine here, on gcc-4.7.
Neil Brown added this use of the 0b prefix in
210d4bc8a3128e3e61ac3b("twl4030_charger: Add backup-battery charging"). Neil, I don't think we can use this syntax yet --Documentation/Changessays that we still support from gcc-3.2 onwards.
I didn't realise that 0b... wasn't universal.
I'll submit a patch.
Thanks,
NeilBrown