Commit bfdca998 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Rename ld flags for vmlinux to LDFLAGS_vmlinux

Everywhere else we use CFLAGS_<target> etc to designate special flags
for an object, so handle vmlinux the same way.
parent 42ec3f17
......@@ -224,7 +224,7 @@ NETWORKS := net/network.o
include arch/$(ARCH)/Makefile
export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
export NETWORKS DRIVERS LIBS HEAD LDFLAGS MAKEBOOT ASFLAGS
# boot target
# ---------------------------------------------------------------------------
......@@ -245,7 +245,7 @@ boot: vmlinux
vmlinux-objs := $(HEAD) $(INIT) $(CORE_FILES) $(LIBS) $(DRIVERS) $(NETWORKS)
quiet_cmd_link_vmlinux = LD $@
cmd_link_vmlinux = $(LD) $(LINKFLAGS) $(HEAD) $(INIT) \
cmd_link_vmlinux = $(LD) $(LDFLAGS_$(@F)) $(HEAD) $(INIT) \
--start-group \
$(CORE_FILES) \
$(LIBS) \
......
......@@ -10,7 +10,7 @@
NM := $(NM) -B
LINKFLAGS = -static -T arch/alpha/vmlinux.lds -N #-relax
LDFLAGS_vmlinux = -static -T arch/alpha/vmlinux.lds -N #-relax
CFLAGS := $(CFLAGS) -pipe -mno-fp-regs -ffixed-8
# Determine if we can use the BWX instructions with GAS.
......
......@@ -7,7 +7,7 @@
#
# Copyright (C) 1995-2001 by Russell King
LINKFLAGS :=-p -X -T arch/arm/vmlinux.lds
LDFLAGS_vmlinux :=-p -X -T arch/arm/vmlinux.lds
GZFLAGS :=-9
CFLAGS +=-pipe
......
......@@ -31,7 +31,7 @@ LD = if [ ! -e $(LD_SCRIPT).tmp -o $(LD_SCRIPT) -nt $(LD_SCRIPT).tmp ]; then \
else true; \
fi && $(CROSS_COMPILE)ld -mcrislinux
LINKFLAGS = -T $(LD_SCRIPT).tmp
LDFLAGS_vmlinux = -T $(LD_SCRIPT).tmp
# objcopy is used to make binary images from the resulting linked file
......
......@@ -18,7 +18,7 @@
LD=$(CROSS_COMPILE)ld -m elf_i386
OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
LINKFLAGS =-T $(TOPDIR)/arch/i386/vmlinux.lds -e stext
LDFLAGS_vmlinux :=-T arch/i386/vmlinux.lds -e stext
CFLAGS += -pipe
......
......@@ -13,7 +13,7 @@ AWK := awk
export AWK
LINKFLAGS = -static -T arch/$(ARCH)/vmlinux.lds
LDFLAGS_vmlinux := -static -T arch/$(ARCH)/vmlinux.lds
AFLAGS_KERNEL := -mconstant-gp
EXTRA =
......
......@@ -25,9 +25,9 @@ ifneq ($(COMPILE_ARCH),$(ARCH))
endif
ifndef CONFIG_SUN3
LINKFLAGS = -T $(TOPDIR)/arch/m68k/vmlinux.lds
LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux.lds
else
LINKFLAGS = -T $(TOPDIR)/arch/m68k/vmlinux-sun3.lds -N
LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux-sun3.lds -N
endif
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
......
......@@ -36,7 +36,7 @@ endif
# crossformat linking we rely on the elf2ecoff tool for format conversion.
#
GCCFLAGS := -G 0 -mno-abicalls -fno-pic
LINKFLAGS += -static
LDFLAGS_vmlinux += -static
MODFLAGS += -mlong-calls
LD := $(LD) -G 0
......@@ -270,7 +270,7 @@ vmlinux: arch/$(ARCH)/ld.script
arch/$(ARCH)/ld.script: arch/$(ARCH)/ld.script.in arch/$(ARCH)/Makefile
sed -e 's/@@LOADADDR@@/$(LOADADDR)/' <$< >$@
LINKFLAGS += -T arch/$(ARCH)/ld.script
LDFLAGS_vmlinux += -T arch/$(ARCH)/ld.script
HEAD := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
......
......@@ -35,7 +35,7 @@ endif
#
CFLAGS += -I $(TOPDIR)/include/asm/gcc $(CFLAGS)
CFLAGS += -mabi=64 -G 0 -mno-abicalls -fno-pic -Wa,--trap -pipe
LINKFLAGS += -G 0 -static # -N
LDFLAGS_vmlinux += -G 0 -static # -N
MODFLAGS += -mlong-calls
ifdef CONFIG_REMOTE_DEBUG
......@@ -118,7 +118,7 @@ endif
#
ifdef CONFIG_BOOT_ELF32
CFLAGS += -Wa,-32
LINKFLAGS += -T arch/mips64/ld.script.elf32
LDFLAGS_vmlinux += -T arch/mips64/ld.script.elf32
endif
#
# The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
......@@ -126,13 +126,13 @@ endif
#
ifdef CONFIG_BOOT_ELF64
CFLAGS += -Wa,-32
LINKFLAGS += -T arch/mips64/ld.script.elf32
LDFLAGS_vmlinux += -T arch/mips64/ld.script.elf32
#AS += -64
#LD += -m elf64bmip
#LINKFLAGS += -T arch/mips64/ld.script.elf64
#LDFLAGS_vmlinux += -T arch/mips64/ld.script.elf64
endif
LINKFLAGS += -Ttext $(LOADADDR)
LDFLAGS_vmlinux += -Ttext $(LOADADDR)
HEAD := arch/mips64/kernel/head.o arch/mips64/kernel/init_task.o
......
......@@ -21,7 +21,7 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
CPP=$(CC) -E
OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux.lds
LDFLAGS_vmlinux =-T arch/parisc/vmlinux.lds
CFLAGS_PIPE := -pipe
CFLAGS_NSR := -fno-strength-reduce
......
......@@ -21,7 +21,7 @@ else
KERNELLOAD =0xc0000000
endif
LINKFLAGS = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic
LDFLAGS_vmlinux = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH)
AFLAGS := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH)
CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -fsigned-char \
......
......@@ -15,7 +15,7 @@
KERNELLOAD =0xc000000000000000
LINKFLAGS = -T arch/ppc64/vmlinux.lds -Bstatic \
LDFLAGS_vmlinux = -T arch/ppc64/vmlinux.lds -Bstatic \
-e $(KERNELLOAD) -Ttext $(KERNELLOAD)
CFLAGS := $(CFLAGS) -fsigned-char -msoft-float -pipe \
-Wno-uninitialized -mminimal-toc -mtraceback=full \
......
......@@ -20,7 +20,7 @@ ifeq ($(CONFIG_SHARED_KERNEL),y)
else
LINKSCRIPT := arch/s390/vmlinux.lds
endif
LINKFLAGS =-T $(TOPDIR)/$(LINKSCRIPT) -e start
LDFLAGS_vmlinux := -T $(LINKSCRIPT) -e start
CFLAGS_PIPE := -pipe
CFLAGS_NSR := -fno-strength-reduce
......
......@@ -21,7 +21,7 @@ ifeq ($(CONFIG_SHARED_KERNEL),y)
else
LINKSCRIPT := arch/s390x/vmlinux.lds
endif
LINKFLAGS =-T $(TOPDIR)/$(LINKSCRIPT) -e start
LDFLAGS_vmlinux := -T $(LINKSCRIPT) -e start
MODFLAGS += -fpic
CFLAGS_PIPE := -pipe
......
......@@ -15,12 +15,12 @@
ifdef CONFIG_CPU_LITTLE_ENDIAN
CFLAGS += -ml
AFLAGS += -ml
# LINKFLAGS += -EL
# LDFLAGS_vmlinux += -EL
LDFLAGS := -EL
else
CFLAGS += -mb
AFLAGS += -mb
# LINKFLAGS += -EB
# LDFLAGS_vmlinux += -EB
LDFLAGS := -EB
endif
......@@ -47,10 +47,10 @@ endif
# none has been choosen above.
#
LINKSCRIPT = arch/sh/vmlinux.lds
LINKFLAGS += -T $(word 1,$(LINKSCRIPT)) -e _stext
LDFLAGS_vmlinux += -T $(word 1,$(LINKSCRIPT)) -e _stext
ifdef LOADADDR
LINKFLAGS += -Ttext $(word 1,$(LOADADDR))
LDFLAGS_vmlinux += -Ttext $(word 1,$(LOADADDR))
endif
#
......
......@@ -30,8 +30,8 @@ else
CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
endif
#LINKFLAGS = -N -Ttext 0xf0004000
LINKFLAGS = -T arch/sparc/vmlinux.lds
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
LDFLAGS_vmlinux = -T arch/sparc/vmlinux.lds
HEAD := arch/sparc/kernel/head.o arch/sparc/kernel/init_task.o
......
......@@ -53,7 +53,7 @@ ifeq ($(CONFIG_MCOUNT),y)
CFLAGS := $(CFLAGS) -pg
endif
LINKFLAGS = -T arch/sparc64/vmlinux.lds
LDFLAGS_vmlinux = -T arch/sparc64/vmlinux.lds
HEAD := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
......
......@@ -35,7 +35,7 @@ export IA32_CC IA32_LD IA32_AS IA32_OBJCOPY IA32_CPP
LD=$(CROSS_COMPILE)ld -m elf_x86_64
OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
LINKFLAGS =-T $(TOPDIR)/arch/x86_64/vmlinux.lds -e stext
LDFLAGS_vmlinux := -T arch/x86_64/vmlinux.lds -e stext
CFLAGS += -mno-red-zone
CFLAGS += -mcmodel=kernel
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment