From 19283265adf53e051a1f372086526b87762bc246 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 28 Oct 1998 14:31:06 -0800 Subject: Makefile.in (cc1): Put C_OBJS, and thence @extra_c_objs@ last. * Makefile.in (cc1): Put C_OBJS, and thence @extra_c_objs@ last. (LIBCPP_OBJS): New. Add cppulp.o. (cppmain, fix-header): Depend on and use libcpp.a. * configure.in (extra_c_objs, extra_cxx_objs): Use libcpp.a instead of the individual object files. * objc/Make-lang.in (cc1obj): Put OBJC_OBJS, and thence @extra_c_objs@, last. * cccp.c (user_label_prefix): New. (main): Set it off -f*leading-underscore. (special_symbol): Use it. * cpplib.c (special_symbol): Likewise. (cpp_handle_option): Handle -f*leading-underscore. * cppulp.c: New file. * output.h (user_label_prefix): Declare it. * dwarf2out.c (ASM_NAME_TO_STRING): Prepend user_label_prefix. * toplev.c (f_options, main): Handle -f*leading-underscore. * defaults.h (ASM_OUTPUT_LABELREF): Use asm_fprintf instead of referencing USER_LABEL_PREFIX directly. * config/nextstep.h (ASM_OUTPUT_LABELREF): Likewise. * m32r/m32r.h (ASM_OUTPUT_LABELREF): Likewise. * final.c (asm_fprintf): Use user_label_prefix instead. * arm/thumb.c (thumb_print_operand): Likewise. * gcc.c (default_compilers): Pass -f*leading-underscore on to cpp wherever appropriate. From-SVN: r23415 --- gcc/cccp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/cccp.c') diff --git a/gcc/cccp.c b/gcc/cccp.c index fbea643..293317e 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -727,6 +727,8 @@ char * wchar_type = WCHAR_TYPE; #ifndef USER_LABEL_PREFIX #define USER_LABEL_PREFIX "" #endif +char * user_label_prefix = USER_LABEL_PREFIX; +#undef USER_LABEL_PREFIX /* The string value for __REGISTER_PREFIX__ */ @@ -1529,6 +1531,13 @@ main (argc, argv) } break; + case 'f': + if (!strcmp (argv[i], "-fleading-underscore")) + user_label_prefix = "_"; + else if (!strcmp (argv[i], "-fno-leading-underscore")) + user_label_prefix = ""; + break; + case 'M': /* The style of the choices here is a bit mixed. The chosen scheme is a hybrid of keeping all options in one string @@ -4282,7 +4291,7 @@ special_symbol (hp, op) break; case T_USER_LABEL_PREFIX_TYPE: - buf = USER_LABEL_PREFIX; + buf = user_label_prefix; break; case T_REGISTER_PREFIX_TYPE: -- cgit v1.1