All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Kill CONFIG_BUILD_ELF64 from Kconfig
@ 2007-02-13  9:18 Franck Bui-Huu
  2007-02-13  9:18 ` [PATCH 1/3] Remove '-mno-explicit-relocs' option when CONFIG_BUILD_ELF64 Franck Bui-Huu
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Franck Bui-Huu @ 2007-02-13  9:18 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, anemo, macro

Hi,

This patchset results from the following thread we had a couple weeks
ago:

http://marc.theaimsgroup.com/?l=linux-mips&m=117000798317188&w=2

Once this patchset is applied, we do not need to configure
CONFIG_BUILD_ELF64 manually. Instead, the makefile should do the right
thing for us:

    - It passes '-msym32' switch to gcc according to the platform's
      load address.

    - We can still force Kbuild to not use '-msym32' whatever the
      value of the load address by passing "BUILD_ELF32=no" when
      invoking make.

Patch #3 renames CONFIG_BUILD_ELF64 into CONFIG_64BIT_BUILD_ELF32. It
simplifies the places where it's used.

This patchset assumes that the compiler will fail if it doesn't
support '-msym32' switch. Therefore we needn't to test gcc's version
when testing CONFIG_64BIT_BUILD_ELF32 value.

Please, consider.

		Franck

---
 arch/mips/Kconfig             |   15 ---------------
 arch/mips/Makefile            |   23 ++++++++++++++++++-----
 include/asm-mips/page.h       |    2 +-
 include/asm-mips/pgtable-64.h |    2 +-
 include/asm-mips/stackframe.h |   12 ++++++------
 5 files changed, 26 insertions(+), 28 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH 1/3] Remove '-mno-explicit-relocs' option when CONFIG_BUILD_ELF64
@ 2007-02-15 13:04 Franck Bui-Huu
  2007-02-15 13:04 ` [PATCH 2/3] Automatically set CONFIG_BUILD_ELF64 Franck Bui-Huu
  0 siblings, 1 reply; 15+ messages in thread
From: Franck Bui-Huu @ 2007-02-15 13:04 UTC (permalink / raw)
  To: linux-mips

From: Franck Bui-Huu <fbuihuu@gmail.com>

This patch removes '-mno-explicit-relocs' usage when
CONFIG_BUILD_ELF64 is set since this option was only required
with the old hack to truncate addresses at the assembly level
where "-mabi=64 -Wa,-mabi=32" was used.

This should yield a small code size improvement for inline
assembly, where the R constraint is used.

The idea is coming from Maciej <macro@linux-mips.org>.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/Makefile |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index c68b5d3..4240ca1 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -60,9 +60,7 @@ vmlinux-32		= vmlinux.32
 vmlinux-64		= vmlinux
 
 cflags-y		+= -mabi=64
-ifdef CONFIG_BUILD_ELF64
-cflags-y		+= $(call cc-option,-mno-explicit-relocs)
-else
+ifndef CONFIG_BUILD_ELF64
 cflags-y		+= $(call cc-option,-msym32)
 endif
 endif
-- 
1.4.4.3.ge6d4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-02-15 13:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13  9:18 [RFC] Kill CONFIG_BUILD_ELF64 from Kconfig Franck Bui-Huu
2007-02-13  9:18 ` [PATCH 1/3] Remove '-mno-explicit-relocs' option when CONFIG_BUILD_ELF64 Franck Bui-Huu
2007-02-13  9:18 ` [PATCH 2/3] Automatically set CONFIG_BUILD_ELF64 Franck Bui-Huu
2007-02-13 16:12   ` Atsushi Nemoto
2007-02-13 17:02     ` Franck Bui-Huu
2007-02-13 16:18   ` Ralf Baechle
2007-02-13 17:09     ` Franck Bui-Huu
2007-02-13 20:05       ` Franck Bui-Huu
2007-02-14  1:28       ` Atsushi Nemoto
2007-02-14  8:20         ` Franck Bui-Huu
2007-02-14 16:14           ` Atsushi Nemoto
2007-02-15  8:36             ` Franck Bui-Huu
2007-02-14 11:42         ` Maciej W. Rozycki
2007-02-13  9:18 ` [PATCH 3/3] Rename CONFIG_BUILD_ELF64 into CONFIG_64BIT_BUILD_ELF32 Franck Bui-Huu
2007-02-15 13:04 [PATCH 1/3] Remove '-mno-explicit-relocs' option when CONFIG_BUILD_ELF64 Franck Bui-Huu
2007-02-15 13:04 ` [PATCH 2/3] Automatically set CONFIG_BUILD_ELF64 Franck Bui-Huu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.