Author: dcoakley Date: 2010-12-16 21:34:55 -0500 (Thu, 16 Dec 2010) New Revision: 3437
Modified: trunk/osprey/driver/OPTIONS trunk/osprey/driver/file_utils.c trunk/osprey/driver/file_utils.h trunk/osprey/driver/main.c trunk/osprey/driver/phases.c trunk/osprey/driver/table.c Log: Remove undocumented -compat-gcc driver option. The effects of this option appear unnecessary and its implementation is not portable since it relies on a weak symbol. o In add_final_ld_args(), all code related to -compat-gcc is commented out. The current behavior, to leave out libopen64rt when -nostdlib is specified, is consistent with gcc and its handling of libgcc. o In file_utils.c the weak symbol and the function want_directory() are dead code because the handling for -I and -L in table.c does not normally pass a path with '-' as the first character, and there's no way to turn -compat-gcc off. o In main(), -compat-gcc is used to generate a warning instead of an error when an unrecognized single-dash option is seen. Make this the default response. o In display_version(), -compat-gcc causes the compiler to report the version of the gcc frontend instead of the Open64 version when the -dump-version option is used. There is no need for this behavior since -dump-version is an Open64-specific option. Approved by: Sun Chan Modified: trunk/osprey/driver/OPTIONS =================================================================== --- trunk/osprey/driver/OPTIONS 2010-12-16 00:00:30 UTC (rev 3436) +++ trunk/osprey/driver/OPTIONS 2010-12-17 02:34:55 UTC (rev 3437) @@ -2324,8 +2324,6 @@ -pthread ; ALL NONE "" "Compile with pthreads support" % gcc compatibility flags --compat-gcc toggle(&compat_gcc,TRUE); ALL NONE "" - "" -Wabi warn_ignored(option_name); ALL cfe self "" "" -### {show_version++; show_but_not_run = TRUE;} ALL NONE "-###" Modified: trunk/osprey/driver/file_utils.c =================================================================== --- trunk/osprey/driver/file_utils.c 2010-12-16 00:00:30 UTC (rev 3436) +++ trunk/osprey/driver/file_utils.c 2010-12-17 02:34:55 UTC (rev 3437) @@ -1,4 +1,8 @@ /* + * Copyright (C) 2010 Advanced Micro Devices, Inc. All Rights Reserved. + */ + +/* * Copyright 2002, 2003, 2004, 2005, 2006 PathScale, Inc. All Rights Reserved. */ @@ -57,16 +61,8 @@ #define DIR_SEPARATOR_STR "/" #endif -extern int errno; static char *saved_orig_program_name; -#if defined(KEY) && defined(SHARED_BUILD) -// compat_gcc is defined in option_names.h which is generated by the executable -// "table". However, building "table" requires linking to this file, so make -// the symbol weak. -extern int compat_gcc __attribute__((weak)); -#endif - /* drops path prefix in string */ char * drop_path (char *s) @@ -167,26 +163,6 @@ return FALSE; } -boolean want_directory (char *path) -{ - if (is_directory(path)) - return TRUE; - -#if defined(KEY) && defined(SHARED_BUILD) - // Warn about missing directory argument to -I/-L. Bug 2794. - if (fullwarn || - (path[0] == '-' && compat_gcc != TRUE)) - warning("%s is not a directory", path); - // Accept anything as a directory after (possibly) warning about the - // invalid ones. - return TRUE; -#else - if (fullwarn) - warning("%s is not a directory", path); - return TRUE; -#endif -} - /* check if directory is writable */ boolean directory_is_writable (char *path) Modified: trunk/osprey/driver/file_utils.h =================================================================== --- trunk/osprey/driver/file_utils.h 2010-12-16 00:00:30 UTC (rev 3436) +++ trunk/osprey/driver/file_utils.h 2010-12-17 02:34:55 UTC (rev 3437) @@ -1,4 +1,8 @@ /* + * Copyright (C) 2010 Advanced Micro Devices, Inc. All Rights Reserved. + */ + +/* * Copyright 2002, 2003, 2004, 2005 PathScale, Inc. All Rights Reserved. */ @@ -57,9 +61,6 @@ /* check whether is a directory */ extern boolean is_directory (char *path); -/* check whether is a directory */ -extern boolean want_directory (char *path); - /* check whether directory is writable */ extern boolean directory_is_writable (char *path); Modified: trunk/osprey/driver/main.c =================================================================== --- trunk/osprey/driver/main.c 2010-12-16 00:00:30 UTC (rev 3436) +++ trunk/osprey/driver/main.c 2010-12-17 02:34:55 UTC (rev 3437) @@ -244,15 +244,9 @@ unrecognized_dashdash_option_name = option_name; } - else if (option_was_seen(O_compat_gcc) || - #ifdef PSC_TO_OPEN64 - getenv("OPEN64_STRICT_GCC")) { - #endif - /* leave this env var undocumented */ + else { + /* warn about unknown single-dash options */ warning("unknown flag: %s", option_name); - } else { - /* print as error or not at all? */ - parse_error(option_name, "unknown flag"); } } } @@ -1003,8 +997,6 @@ keep_flag = TRUE; } else if (!strcmp(argv[i], "-save_temps")) { keep_flag = TRUE; - } else if (!strcmp(argv[i], "-compat-gcc")) { - compat_gcc = TRUE; } else if (!strcmp(argv[i], "-S")) { ipa_conflict_option = argv[i]; } else if (!strcmp(argv[i], "-fbgen")) { @@ -1504,12 +1496,7 @@ gnu_major_version); if (dump_version_only == TRUE) { - #ifdef PSC_TO_OPEN64 - if (option_was_seen(O_compat_gcc)) - puts(open64_gcc_version); - else - puts(OPEN64_FULL_VERSION); - #endif + puts(OPEN64_FULL_VERSION); return; } Modified: trunk/osprey/driver/phases.c =================================================================== --- trunk/osprey/driver/phases.c 2010-12-16 00:00:30 UTC (rev 3436) +++ trunk/osprey/driver/phases.c 2010-12-17 02:34:55 UTC (rev 3437) @@ -2034,12 +2034,6 @@ #ifdef TARG_X8664 extern boolean link_with_mathlib; if (option_was_seen(O_nodefaultlibs) || option_was_seen(O_nostdlib)) { - // If -compat-gcc, link with open64rt even if -nostdlib. Bug 4551. - if (option_was_seen(O_compat_gcc) && - !option_was_seen(O_fno_fast_stdlib) && - !option_was_seen(O_nolibopen64rt)) { // bug 9611 - // add_library(args, "open64rt"); - } return; } #endif Modified: trunk/osprey/driver/table.c =================================================================== --- trunk/osprey/driver/table.c 2010-12-16 00:00:30 UTC (rev 3436) +++ trunk/osprey/driver/table.c 2010-12-17 02:34:55 UTC (rev 3437) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Advanced Micro Devices, Inc. All Rights Reserved. + * Copyright (C) 2009-2010 Advanced Micro Devices, Inc. All Rights Reserved. */ /* @@ -827,7 +827,7 @@ || options[i].syntax == needs_directory_or_null #endif ) { - fprintf(f, "\tif (want_directory(next_string(argv,argi))) {\n"); + fprintf(f, "\tif (is_directory(next_string(argv,argi))) {\n"); } fprintf(f, "\t\toptargs = get_optarg(argv, argi);\n"); if (options[i].syntax == needs_decimal) { ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel