This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Add -mx32 to x86-64 ASM_SPEC
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Uros Bizjak <ubizjak at gmail dot com>
- Date: Wed, 24 Apr 2013 11:37:55 -0700
- Subject: PATCH: Add -mx32 to x86-64 ASM_SPEC
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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.
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) \