Message ID | 20180502083753.25090-1-joel@jms.id.au |
---|---|
Headers | show |
Series | Support building with clang | expand |
On Wed, 2018-05-02 at 18:07 +0930, Joel Stanley wrote: > Hello Skibooters! > > This series contains cleanups and modifications that are required to > build skiboot with clang. > > If you want to try it out: > > $ sudo apt-get install clang > $ make CC=clang > > I've done all of my testing with clang-7 (trunk). Clang 6 works fine > too, but earlier versions have a number of issues. > > Most of the patches could be considered cleanup or have no impact on GCC > builds. > > The last three that change the make file are quite clang specific, but > again have no impact on normal building of skiboot. > > Please test, and if they look good, merge! I have plans down the track > for using clang to improve our code quality. > > Cheers, > > Joel > > Joel Stanley (13): > asm: Fix up assembly for clang > cpu.h: Use this_cpu through accessor > cpu.h: implement this_cpu for clang > libflash/ecc: disable asm version for clang > processor.h: implement sndmsg instructions > Makefile: Use LD to link the final binary > Fix asm-offsets generation > pci-quirk: Fix initiliser warning > imc: Remove extra parentheses in test > fsp: Fix msg vaargs usage > Makefile: Put some ppc options behind try-cflag tests > Makefile: Add additional flags when using clang > Makefile: Disable warnings to make clang happy > These patches don't seem to be in order, in the sense that I'd expect the first patch to fix the Makefile for -ffixed-reg and -m* and -Wl. Then fix the files that don't compile, etc Balbir Singh.
On 2 May 2018 at 18:35, Balbir Singh <bsingharora@gmail.com> wrote: > On Wed, 2018-05-02 at 18:07 +0930, Joel Stanley wrote: >> Hello Skibooters! >> >> This series contains cleanups and modifications that are required to >> build skiboot with clang. >> >> If you want to try it out: >> >> $ sudo apt-get install clang >> $ make CC=clang >> >> I've done all of my testing with clang-7 (trunk). Clang 6 works fine >> too, but earlier versions have a number of issues. >> >> Most of the patches could be considered cleanup or have no impact on GCC >> builds. >> >> The last three that change the make file are quite clang specific, but >> again have no impact on normal building of skiboot. >> >> Please test, and if they look good, merge! I have plans down the track >> for using clang to improve our code quality. >> >> Cheers, >> >> Joel >> >> Joel Stanley (13): >> asm: Fix up assembly for clang >> cpu.h: Use this_cpu through accessor >> cpu.h: implement this_cpu for clang >> libflash/ecc: disable asm version for clang >> processor.h: implement sndmsg instructions >> Makefile: Use LD to link the final binary >> Fix asm-offsets generation >> pci-quirk: Fix initiliser warning >> imc: Remove extra parentheses in test >> fsp: Fix msg vaargs usage >> Makefile: Put some ppc options behind try-cflag tests >> Makefile: Add additional flags when using clang >> Makefile: Disable warnings to make clang happy >> > > These patches don't seem to be in order, in the sense that I'd expect > the first patch to fix the Makefile for -ffixed-reg and -m* and -Wl. > Then fix the files that don't compile, etc Yeah I had it that way, but thought this would make more sense. I'll think a bit harder before posting a second version. Cheers, Joel
Joel Stanley <joel@jms.id.au> writes: > Please test, and if they look good, merge! I have plans down the track > for using clang to improve our code quality. I managed to get 'scan-build --use-cc=clang make CC=clang' get me something sensible! I think it even found what could technically be a bug or two.