This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Detecting UTF-8 support in GAS


This patch checks whether the assembler supports UTF-8. As such, it is
foundation to use UTF-8 in Java and C++ symbols; no attempt is done to
enhance jc1 or cc1plus to emit UTF-8 symbols.

Atleast binutils 2.10 supports this feature; I haven't checked many
other assemblers except for Solaris' /usr/ccs/bin/as, which doesn't
support it.

Regards,
Martin

2001-01-20  Martin v. Löwis  <loewis@informatik.hu-berlin.de>

	* configure.in: Detect HAVE_GAS_UTF8.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.478
diff -u -r1.478 configure.in
--- configure.in	2001/01/15 23:32:25	1.478
+++ configure.in	2001/01/20 14:06:19
@@ -1312,6 +1312,32 @@
 fi
 AC_MSG_RESULT($gcc_cv_as_hidden)
 
+AC_MSG_CHECKING(assembler UTF-8 support)
+gcc_cv_as_utf8=no
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
+  if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
+    gcc_cv_as_utf8="yes"
+  fi
+elif test x$gcc_cv_as != x; then
+	# Check that assembler supports UTF-8 symbols.
+	# Since the shell may fool us, transmit it as uuencode
+	uudecode << 'SHAR_EOF'
+begin 600 conftest.s
+'0L.V<V4Z"D#P
+`
+end
+SHAR_EOF
+	if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+		gcc_cv_as_utf8="yes"
+	fi
+	rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
+fi
+if test x"$gcc_cv_as_utf8" = xyes; then
+	AC_DEFINE(HAVE_GAS_UTF8, 1,
+		[Define if your assembler supports UTF-8 symbols.])
+fi
+AC_MSG_RESULT($gcc_cv_as_utf8)
+
 case "$target" in 
   sparc*-*-*)
     AC_CACHE_CHECK([assembler .register pseudo-op support],

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]