diff options
author | Richard Braun <rbraun@sceen.net> | 2018-04-09 20:32:54 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-04-09 20:32:54 +0200 |
commit | 25b89e773603f7c479b731f82d2d8189e0455fcd (patch) | |
tree | 64620d392b8210514bb712c9ed2b15b24bdd7429 /arch | |
parent | 2e2f5a495e8204c85e929e0f4088bae55fb81989 (diff) |
Make linking with libgcc a per-architecture option
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f0640f7..9866d93 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -20,11 +20,20 @@ XBUILD_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 ifeq ($(CONFIG_X86_32),y) biarch := $(call cc-option,-m32) + XBUILD_CPPFLAGS += -m32 + + XBUILD_LDFLAGS += -lgcc else biarch := -m64 + XBUILD_CPPFLAGS += -m64 + # XXX The kernel isn't linked with libgcc on amd64, because libgcc + # uses red zones. But since there are actually very few functions + # provided by libgcc on amd64, it was decided to just not link with + # it. If it turns out that libgcc is really needed some day, the + # kernel can somewhat easily be changed to support red zones. XBUILD_CFLAGS += -mno-red-zone XBUILD_CFLAGS += -mcmodel=kernel endif |