Patchwork PATCH: Add -mx32 to x86-64 ASM_SPEC

login
register
mail settings
Submitter H.J. Lu
Date April 24, 2013, 6:37 p.m.
Message ID <20130424183754.GA13973@intel.com>
Download mbox | patch
Permalink /patch/239296/
State New
Headers show

Comments

H.J. Lu - April 24, 2013, 6:37 p.m.
When GCC is configured for x86_64-elf for embedded target, --x32 isn't
passed to assembler for "gcc -mx32".  This patch adds -mx32 support to
GCC assembler driver.  OK for trunk?

Thanks.


H.J.
---
2013-04-24  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/x86-64.h (ASM_SPEC): Support -mx32.
Jan Hubicka - April 24, 2013, 7:23 p.m.
> When GCC is configured for x86_64-elf for embedded target, --x32 isn't
> passed to assembler for "gcc -mx32".  This patch adds -mx32 support to
> GCC assembler driver.  OK for trunk?

OK,
Thanks
Honza

Patch

diff --git a/gcc/config/i386/x86-64.h b/gcc/config/i386/x86-64.h
index c103c58..3363439 100644
--- a/gcc/config/i386/x86-64.h
+++ b/gcc/config/i386/x86-64.h
@@ -49,7 +49,7 @@  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define WCHAR_TYPE_SIZE 32
 
 #undef ASM_SPEC
-#define ASM_SPEC "%{m32:--32} %{m64:--64}"
+#define ASM_SPEC "%{m32:--32} %{m64:--64} %{mx32:--x32}"
 
 #undef ASM_OUTPUT_ALIGNED_BSS
 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \