Skip to contentSkip to conversation

linker script preprocessing problem

Linux-ia64 Jim Wilson 1 participant 1 message Nov 22, 2000

lore
Share & tools
lore

Jim Wilson

author
#0 lore raw

In order to compile the test10 kernel with current FSF binutils/gcc sources, I needed to add the -traditional option to the command that preprocesses the linker scripts. Otherwise the cpp output isn't valid linker input because it has been tokenized for C.

The output looks a little strange, so there might be a temporary FSF gcc instability here, but in general you should always use -traditional when preprocessing something that isn't C source code. Or else use something that isn't C specific, like m4.

arch/ia64/Makefile:

*** Makefile~ Mon Oct 9 17:54:53 2000
--- Makefile Tue Nov 21 17:49:45 2000
*************** vmlinux: arch/$(ARCH)/vmlinux.lds
*** 96,102 ****

arch/$(ARCH)/vmlinux.lds: arch/$(ARCH)/vmlinux.lds.S FORCE
$(CPP) -D__ASSEMBLY__ -C -P -I$(HPATH) -I$(HPATH)/asm-$(ARCH) \
! arch/$(ARCH)/vmlinux.lds.S > $@

FORCE: ;

--- 96,102 ----

arch/$(ARCH)/vmlinux.lds: arch/$(ARCH)/vmlinux.lds.S FORCE
$(CPP) -D__ASSEMBLY__ -C -P -I$(HPATH) -I$(HPATH)/asm-$(ARCH) \
! arch/$(ARCH)/vmlinux.lds.S -traditional > $@

FORCE: ;