From 390b425296337ec0c0ddfe41e5357fa6f8f6a22f Mon Sep 17 00:00:00 2001 From: Simon 'corecode' Schubert Date: Sat, 3 Jan 2009 23:51:53 +0100 Subject: [PATCH] Fold patches into contrib. --- contrib/gcc-4.1/gcc/c-format.c | 65 +++++- contrib/gcc-4.1/gcc/gcc.c | 111 +-------- contrib/gcc-4.1/gcc/system.h | 2 +- gnu/usr.bin/cc41/cc_prep/Makefile | 15 -- .../cc41/cc_prep/patches/c-format.c.patch | 89 -------- gnu/usr.bin/cc41/cc_prep/patches/gcc.c.patch | 213 ------------------ .../cc41/cc_prep/patches/system.h.patch | 13 -- 7 files changed, 74 insertions(+), 434 deletions(-) delete mode 100644 gnu/usr.bin/cc41/cc_prep/patches/c-format.c.patch delete mode 100644 gnu/usr.bin/cc41/cc_prep/patches/gcc.c.patch delete mode 100644 gnu/usr.bin/cc41/cc_prep/patches/system.h.patch diff --git a/contrib/gcc-4.1/gcc/c-format.c b/contrib/gcc-4.1/gcc/c-format.c index 82f2bc77b0..7684258146 100644 --- a/contrib/gcc-4.1/gcc/c-format.c +++ b/contrib/gcc-4.1/gcc/c-format.c @@ -506,6 +506,19 @@ static const format_char_info print_char_table[] = { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL }, /* GNU conversion specifiers. */ { "m", 0, STD_EXT, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL }, + /* BSD conversion specifiers. */ + /* DragonFly kernel extensions (src/sys/kern/subr_prf.c). + The format %b is supported to decode error registers. + Its usage is: printf("reg=%b\n", regval, "*"); + which produces: reg=3 + The format %D provides a hexdump given a pointer and separator string: + ("%6D", ptr, ":") -> XX:XX:XX:XX:XX:XX + ("%*D", len, ptr, " ") -> XX XX XX XX ... + */ + { "D", 1, STD_EXT, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL }, + { "b", 1, STD_EXT, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL }, + { "ry", 0, STD_EXT, { T89_I, BADLEN, BADLEN, T89_L, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "i", NULL }, + { "z", 0, STD_EXT, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i", NULL }, { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL } }; @@ -1800,6 +1813,56 @@ check_format_info_main (format_check_results *res, } } + if (*format_chars == 'b') + { + /* There should be an int arg to control the string arg. */ + if (params == 0) + { + warning (OPT_Wformat, "too few arguments for format"); + return; + } + if (info->first_arg_num != 0) + { + cur_param = TREE_VALUE (params); + params = TREE_CHAIN (params); + ++arg_num; + if ((TYPE_MAIN_VARIANT (TREE_TYPE (cur_param)) + != integer_type_node) + && + (TYPE_MAIN_VARIANT (TREE_TYPE (cur_param)) + != unsigned_type_node)) + { + warning (OPT_Wformat, "bitmap is not type int (arg %d)", + arg_num); + } + } + } + if (*format_chars == 'D') + { + /* There should be an unsigned char * arg before the string arg. */ + if (params == 0) + { + warning (OPT_Wformat, "too few arguments for format"); + return; + } + if (info->first_arg_num != 0) + { + tree cur_type; + + cur_param = TREE_VALUE (params); + params = TREE_CHAIN (params); + ++arg_num; + cur_type = TREE_TYPE (cur_param); + if (TREE_CODE (cur_type) != POINTER_TYPE + || TYPE_MAIN_VARIANT (TREE_TYPE (cur_type)) + != unsigned_char_type_node) + { + warning (OPT_Wformat, "ethernet address is not type unsigned char * (arg %d)", + arg_num); + } + } + } + format_char = *format_chars; if (format_char == 0 || (!(fki->flags & (int) FMT_FLAG_FANCY_PERCENT_OK) @@ -1930,7 +1993,7 @@ check_format_info_main (format_check_results *res, y2k_level = 2; if (y2k_level == 3) warning (OPT_Wformat_y2k, "%<%%%c%> yields only last 2 digits of " - "year in some locales", format_char); + "year in some locales on non-BSD systems", format_char); else if (y2k_level == 2) warning (OPT_Wformat_y2k, "%<%%%c%> yields only last 2 digits of " "year", format_char); diff --git a/contrib/gcc-4.1/gcc/gcc.c b/contrib/gcc-4.1/gcc/gcc.c index 08fc3a8632..f233ab696d 100644 --- a/contrib/gcc-4.1/gcc/gcc.c +++ b/contrib/gcc-4.1/gcc/gcc.c @@ -733,6 +733,7 @@ static const char *link_ssp_spec = LINK_SSP_SPEC; static const char *asm_spec = ASM_SPEC; static const char *asm_final_spec = ASM_FINAL_SPEC; static const char *link_spec = LINK_SPEC; +static const char *pre_lib_spec = PRE_LIB_SPEC; static const char *lib_spec = LIB_SPEC; static const char *mfwrap_spec = MFWRAP_SPEC; static const char *mflib_spec = MFLIB_SPEC; @@ -1441,30 +1442,10 @@ static const char *gcc_libexec_prefix; #define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" #endif -#ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */ -#undef MD_EXEC_PREFIX -#undef MD_STARTFILE_PREFIX -#undef MD_STARTFILE_PREFIX_1 -#endif - -/* If no prefixes defined, use the null string, which will disable them. */ -#ifndef MD_EXEC_PREFIX -#define MD_EXEC_PREFIX "" -#endif -#ifndef MD_STARTFILE_PREFIX -#define MD_STARTFILE_PREFIX "" -#endif -#ifndef MD_STARTFILE_PREFIX_1 -#define MD_STARTFILE_PREFIX_1 "" -#endif - static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/"; static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/"; -static const char *md_exec_prefix = MD_EXEC_PREFIX; -static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; -static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; static const char *const standard_startfile_prefix_1 = STANDARD_STARTFILE_PREFIX_1; @@ -1530,6 +1511,7 @@ static struct spec_list static_specs[] = INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec), INIT_STATIC_SPEC ("endfile", &endfile_spec), INIT_STATIC_SPEC ("link", &link_spec), + INIT_STATIC_SPEC ("pre_lib", &pre_lib_spec), INIT_STATIC_SPEC ("lib", &lib_spec), INIT_STATIC_SPEC ("mfwrap", &mfwrap_spec), INIT_STATIC_SPEC ("mflib", &mflib_spec), @@ -1546,9 +1528,6 @@ static struct spec_list static_specs[] = INIT_STATIC_SPEC ("multilib_options", &multilib_options), INIT_STATIC_SPEC ("linker", &linker_name_spec), INIT_STATIC_SPEC ("link_libgcc", &link_libgcc_spec), - INIT_STATIC_SPEC ("md_exec_prefix", &md_exec_prefix), - INIT_STATIC_SPEC ("md_startfile_prefix", &md_startfile_prefix), - INIT_STATIC_SPEC ("md_startfile_prefix_1", &md_startfile_prefix_1), INIT_STATIC_SPEC ("startfile_prefix_spec", &startfile_prefix_spec), INIT_STATIC_SPEC ("sysroot_spec", &sysroot_spec), INIT_STATIC_SPEC ("sysroot_suffix_spec", &sysroot_suffix_spec), @@ -3278,8 +3257,6 @@ process_command (int argc, const char **argv) set_std_prefix (gcc_exec_prefix, len); add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC", PREFIX_PRIORITY_LAST, 0, 0); - add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC", - PREFIX_PRIORITY_LAST, 0, 0); } /* COMPILER_PATH and LIBRARY_PATH have values @@ -3827,11 +3804,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" PREFIX_PRIORITY_LAST, 2, 0); #endif - add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS", - PREFIX_PRIORITY_LAST, 1, 0); - add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS", - PREFIX_PRIORITY_LAST, 1, 0); - tooldir_prefix = concat (tooldir_base_prefix, spec_machine, dir_separator_str, NULL); @@ -3854,10 +3826,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" concat (gcc_exec_tooldir_prefix, "bin", dir_separator_str, NULL), NULL, PREFIX_PRIORITY_LAST, 0, 0); - add_prefix (&startfile_prefixes, - concat (gcc_exec_tooldir_prefix, "lib", - dir_separator_str, NULL), - NULL, PREFIX_PRIORITY_LAST, 0, 1); } tooldir_prefix = concat (standard_exec_prefix, spec_machine, @@ -3865,13 +3833,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" dir_separator_str, tooldir_prefix, NULL); } - add_prefix (&exec_prefixes, - concat (tooldir_prefix, "bin", dir_separator_str, NULL), - "BINUTILS", PREFIX_PRIORITY_LAST, 0, 0); - add_prefix (&startfile_prefixes, - concat (tooldir_prefix, "lib", dir_separator_str, NULL), - "BINUTILS", PREFIX_PRIORITY_LAST, 0, 1); - #if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS) /* If the normal TARGET_SYSTEM_ROOT is inside of $exec_prefix, then consider it to relocate with the rest of the GCC installation @@ -6138,10 +6099,6 @@ main (int argc, const char **argv) /* Read specs from a file if there is one. */ - machine_suffix = concat (spec_machine, dir_separator_str, - spec_version, dir_separator_str, NULL); - just_machine_suffix = concat (spec_machine, dir_separator_str, NULL); - specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, 0); /* Read the specs file unless it is a default one. */ if (specs_file != 0 && strcmp (specs_file, "specs")) @@ -6151,11 +6108,9 @@ main (int argc, const char **argv) /* We need to check standard_exec_prefix/just_machine_suffix/specs for any override of as, ld and libraries. */ - specs_file = alloca (strlen (standard_exec_prefix) - + strlen (just_machine_suffix) + sizeof ("specs")); + specs_file = alloca (strlen (standard_exec_prefix) + sizeof ("specs")); strcpy (specs_file, standard_exec_prefix); - strcat (specs_file, just_machine_suffix); strcat (specs_file, "specs"); if (access (specs_file, R_OK) == 0) read_specs (specs_file, TRUE); @@ -6172,17 +6127,6 @@ main (int argc, const char **argv) for (i = 0; i < ARRAY_SIZE (driver_self_specs); i++) do_self_spec (driver_self_specs[i]); - /* If not cross-compiling, look for executables in the standard - places. */ - if (*cross_compile == '0') - { - if (*md_exec_prefix) - { - add_prefix (&exec_prefixes, md_exec_prefix, "GCC", - PREFIX_PRIORITY_LAST, 0, 0); - } - } - /* Process sysroot_suffix_spec. */ if (*sysroot_suffix_spec != 0 && do_spec_2 (sysroot_suffix_spec) == 0) @@ -6228,49 +6172,12 @@ main (int argc, const char **argv) } /* We should eventually get rid of all these and stick to startfile_prefix_spec exclusively. */ - else if (*cross_compile == '0' || target_system_root) + else { - if (*md_startfile_prefix) - add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix, - "GCC", PREFIX_PRIORITY_LAST, 0, 1); - - if (*md_startfile_prefix_1) - add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix_1, - "GCC", PREFIX_PRIORITY_LAST, 0, 1); - - /* If standard_startfile_prefix is relative, base it on - standard_exec_prefix. This lets us move the installed tree - as a unit. If GCC_EXEC_PREFIX is defined, base - standard_startfile_prefix on that as well. - - If the prefix is relative, only search it for native compilers; - otherwise we will search a directory containing host libraries. */ - if (IS_ABSOLUTE_PATH (standard_startfile_prefix)) - add_sysrooted_prefix (&startfile_prefixes, - standard_startfile_prefix, "BINUTILS", - PREFIX_PRIORITY_LAST, 0, 1); - else if (*cross_compile == '0') - { - if (gcc_exec_prefix) - add_prefix (&startfile_prefixes, - concat (gcc_exec_prefix, machine_suffix, - standard_startfile_prefix, NULL), - NULL, PREFIX_PRIORITY_LAST, 0, 1); - add_prefix (&startfile_prefixes, - concat (standard_exec_prefix, - machine_suffix, - standard_startfile_prefix, NULL), - NULL, PREFIX_PRIORITY_LAST, 0, 1); - } - - if (*standard_startfile_prefix_1) - add_sysrooted_prefix (&startfile_prefixes, - standard_startfile_prefix_1, "BINUTILS", - PREFIX_PRIORITY_LAST, 0, 1); - if (*standard_startfile_prefix_2) - add_sysrooted_prefix (&startfile_prefixes, - standard_startfile_prefix_2, "BINUTILS", - PREFIX_PRIORITY_LAST, 0, 1); + add_prefix (&startfile_prefixes, standard_startfile_prefix, + "GCC", PREFIX_PRIORITY_LAST, 0, 1); + add_prefix (&startfile_prefixes, standard_startfile_prefix_1, + "GCC", PREFIX_PRIORITY_LAST, 0, 1); } /* Process any user specified specs in the order given on the command @@ -6306,7 +6213,7 @@ main (int argc, const char **argv) if (print_search_dirs) { - printf (_("install: %s%s\n"), standard_exec_prefix, machine_suffix); + printf (_("install: %s\n"), standard_exec_prefix); printf (_("programs: %s\n"), build_search_list (&exec_prefixes, "", 0)); printf (_("libraries: %s\n"), build_search_list (&startfile_prefixes, "", 0)); return (0); diff --git a/contrib/gcc-4.1/gcc/system.h b/contrib/gcc-4.1/gcc/system.h index 34c9009f14..281e9b5d05 100644 --- a/contrib/gcc-4.1/gcc/system.h +++ b/contrib/gcc-4.1/gcc/system.h @@ -646,7 +646,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; #undef strdup #pragma GCC poison calloc strdup -#if !defined(FLEX_SCANNER) && !defined(YYBISON) +#if !defined(FLEX_SCANNER) && !defined(YYBISON) && !defined(YYBYACC) #undef malloc #undef realloc #pragma GCC poison malloc realloc diff --git a/gnu/usr.bin/cc41/cc_prep/Makefile b/gnu/usr.bin/cc41/cc_prep/Makefile index f4f52b0987..41421c8a25 100644 --- a/gnu/usr.bin/cc41/cc_prep/Makefile +++ b/gnu/usr.bin/cc41/cc_prep/Makefile @@ -3,7 +3,6 @@ .include "../Makefile.inc" .include "../Makefile.langs" -PATCHES!= echo ${.CURDIR}/patches/*.patch CONTRIBDIR= ${GCCDIR}/gcc BASEVER_s!= cat ${CONTRIBDIR}/BASE-VER @@ -81,17 +80,3 @@ CLEANFILES+= options.c options.h optionlist # keep this order! depend: version.c configargs.h bconfig.h tm.h tm_p.h options.h options.c - -# we don't use SRCS, so we can't use the normal bsd.dep.mk code -.for _PSRC in ${PATCHES:M*.patch} -.for _PC in ${_PSRC:T:S/.patch$//:S|,|/|g} - -${_PC}: ${CONTRIBDIR}/${_PC} ${_PSRC} - mkdir -p ${.TARGET:H} - patch -o ${.TARGET} -i ${.ALLSRC:M*.patch} ${CONTRIBDIR}/${.TARGET} - -CLEANFILES:= ${CLEANFILES} ${_PC} - -depend: ${_PC} -.endfor -.endfor diff --git a/gnu/usr.bin/cc41/cc_prep/patches/c-format.c.patch b/gnu/usr.bin/cc41/cc_prep/patches/c-format.c.patch deleted file mode 100644 index 4c6f32154b..0000000000 --- a/gnu/usr.bin/cc41/cc_prep/patches/c-format.c.patch +++ /dev/null @@ -1,89 +0,0 @@ -$DragonFly: src/gnu/usr.bin/cc41/cc_prep/patches/c-format.c.patch,v 1.1 2006/09/27 12:10:34 corecode Exp $ ---- c-format.c 2006-09-16 20:11:29.000000000 +0200 -+++ c-format.c 2006-09-26 01:05:46.000000000 +0200 -@@ -506,6 +506,19 @@ - { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL }, - /* GNU conversion specifiers. */ - { "m", 0, STD_EXT, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL }, -+ /* BSD conversion specifiers. */ -+ /* DragonFly kernel extensions (src/sys/kern/subr_prf.c). -+ The format %b is supported to decode error registers. -+ Its usage is: printf("reg=%b\n", regval, "*"); -+ which produces: reg=3 -+ The format %D provides a hexdump given a pointer and separator string: -+ ("%6D", ptr, ":") -> XX:XX:XX:XX:XX:XX -+ ("%*D", len, ptr, " ") -> XX XX XX XX ... -+ */ -+ { "D", 1, STD_EXT, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL }, -+ { "b", 1, STD_EXT, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL }, -+ { "ry", 0, STD_EXT, { T89_I, BADLEN, BADLEN, T89_L, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "i", NULL }, -+ { "z", 0, STD_EXT, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i", NULL }, - { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL } - }; - -@@ -1800,6 +1813,56 @@ - } - } - -+ if (*format_chars == 'b') -+ { -+ /* There should be an int arg to control the string arg. */ -+ if (params == 0) -+ { -+ warning (OPT_Wformat, "too few arguments for format"); -+ return; -+ } -+ if (info->first_arg_num != 0) -+ { -+ cur_param = TREE_VALUE (params); -+ params = TREE_CHAIN (params); -+ ++arg_num; -+ if ((TYPE_MAIN_VARIANT (TREE_TYPE (cur_param)) -+ != integer_type_node) -+ && -+ (TYPE_MAIN_VARIANT (TREE_TYPE (cur_param)) -+ != unsigned_type_node)) -+ { -+ warning (OPT_Wformat, "bitmap is not type int (arg %d)", -+ arg_num); -+ } -+ } -+ } -+ if (*format_chars == 'D') -+ { -+ /* There should be an unsigned char * arg before the string arg. */ -+ if (params == 0) -+ { -+ warning (OPT_Wformat, "too few arguments for format"); -+ return; -+ } -+ if (info->first_arg_num != 0) -+ { -+ tree cur_type; -+ -+ cur_param = TREE_VALUE (params); -+ params = TREE_CHAIN (params); -+ ++arg_num; -+ cur_type = TREE_TYPE (cur_param); -+ if (TREE_CODE (cur_type) != POINTER_TYPE -+ || TYPE_MAIN_VARIANT (TREE_TYPE (cur_type)) -+ != unsigned_char_type_node) -+ { -+ warning (OPT_Wformat, "ethernet address is not type unsigned char * (arg %d)", -+ arg_num); -+ } -+ } -+ } -+ - format_char = *format_chars; - if (format_char == 0 - || (!(fki->flags & (int) FMT_FLAG_FANCY_PERCENT_OK) -@@ -1930,7 +1993,7 @@ - y2k_level = 2; - if (y2k_level == 3) - warning (OPT_Wformat_y2k, "%<%%%c%> yields only last 2 digits of " -- "year in some locales", format_char); -+ "year in some locales on non-BSD systems", format_char); - else if (y2k_level == 2) - warning (OPT_Wformat_y2k, "%<%%%c%> yields only last 2 digits of " - "year", format_char); diff --git a/gnu/usr.bin/cc41/cc_prep/patches/gcc.c.patch b/gnu/usr.bin/cc41/cc_prep/patches/gcc.c.patch deleted file mode 100644 index 979ccd2546..0000000000 --- a/gnu/usr.bin/cc41/cc_prep/patches/gcc.c.patch +++ /dev/null @@ -1,213 +0,0 @@ -$DragonFly: src/gnu/usr.bin/cc41/cc_prep/patches/gcc.c.patch,v 1.2 2007/08/23 06:19:20 corecode Exp $ - ---- gcc.c.orig 2007-02-17 03:26:15 +0100 -+++ gcc.c 2007-08-22 11:56:58 +0200 -@@ -733,6 +733,7 @@ - static const char *asm_spec = ASM_SPEC; - static const char *asm_final_spec = ASM_FINAL_SPEC; - static const char *link_spec = LINK_SPEC; -+static const char *pre_lib_spec = PRE_LIB_SPEC; - static const char *lib_spec = LIB_SPEC; - static const char *mfwrap_spec = MFWRAP_SPEC; - static const char *mflib_spec = MFLIB_SPEC; -@@ -1441,30 +1442,10 @@ - #define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" - #endif - --#ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */ --#undef MD_EXEC_PREFIX --#undef MD_STARTFILE_PREFIX --#undef MD_STARTFILE_PREFIX_1 --#endif -- --/* If no prefixes defined, use the null string, which will disable them. */ --#ifndef MD_EXEC_PREFIX --#define MD_EXEC_PREFIX "" --#endif --#ifndef MD_STARTFILE_PREFIX --#define MD_STARTFILE_PREFIX "" --#endif --#ifndef MD_STARTFILE_PREFIX_1 --#define MD_STARTFILE_PREFIX_1 "" --#endif -- - static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; - static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/"; - static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/"; --static const char *md_exec_prefix = MD_EXEC_PREFIX; - --static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; --static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; - static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; - static const char *const standard_startfile_prefix_1 - = STANDARD_STARTFILE_PREFIX_1; -@@ -1530,6 +1511,7 @@ - INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec), - INIT_STATIC_SPEC ("endfile", &endfile_spec), - INIT_STATIC_SPEC ("link", &link_spec), -+ INIT_STATIC_SPEC ("pre_lib", &pre_lib_spec), - INIT_STATIC_SPEC ("lib", &lib_spec), - INIT_STATIC_SPEC ("mfwrap", &mfwrap_spec), - INIT_STATIC_SPEC ("mflib", &mflib_spec), -@@ -1546,9 +1528,6 @@ - INIT_STATIC_SPEC ("multilib_options", &multilib_options), - INIT_STATIC_SPEC ("linker", &linker_name_spec), - INIT_STATIC_SPEC ("link_libgcc", &link_libgcc_spec), -- INIT_STATIC_SPEC ("md_exec_prefix", &md_exec_prefix), -- INIT_STATIC_SPEC ("md_startfile_prefix", &md_startfile_prefix), -- INIT_STATIC_SPEC ("md_startfile_prefix_1", &md_startfile_prefix_1), - INIT_STATIC_SPEC ("startfile_prefix_spec", &startfile_prefix_spec), - INIT_STATIC_SPEC ("sysroot_spec", &sysroot_spec), - INIT_STATIC_SPEC ("sysroot_suffix_spec", &sysroot_suffix_spec), -@@ -3278,8 +3257,6 @@ - set_std_prefix (gcc_exec_prefix, len); - add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC", - PREFIX_PRIORITY_LAST, 0, 0); -- add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC", -- PREFIX_PRIORITY_LAST, 0, 0); - } - - /* COMPILER_PATH and LIBRARY_PATH have values -@@ -3827,11 +3804,6 @@ - PREFIX_PRIORITY_LAST, 2, 0); - #endif - -- add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS", -- PREFIX_PRIORITY_LAST, 1, 0); -- add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS", -- PREFIX_PRIORITY_LAST, 1, 0); -- - tooldir_prefix = concat (tooldir_base_prefix, spec_machine, - dir_separator_str, NULL); - -@@ -3854,10 +3826,6 @@ - concat (gcc_exec_tooldir_prefix, "bin", - dir_separator_str, NULL), - NULL, PREFIX_PRIORITY_LAST, 0, 0); -- add_prefix (&startfile_prefixes, -- concat (gcc_exec_tooldir_prefix, "lib", -- dir_separator_str, NULL), -- NULL, PREFIX_PRIORITY_LAST, 0, 1); - } - - tooldir_prefix = concat (standard_exec_prefix, spec_machine, -@@ -3865,13 +3833,6 @@ - dir_separator_str, tooldir_prefix, NULL); - } - -- add_prefix (&exec_prefixes, -- concat (tooldir_prefix, "bin", dir_separator_str, NULL), -- "BINUTILS", PREFIX_PRIORITY_LAST, 0, 0); -- add_prefix (&startfile_prefixes, -- concat (tooldir_prefix, "lib", dir_separator_str, NULL), -- "BINUTILS", PREFIX_PRIORITY_LAST, 0, 1); -- - #if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS) - /* If the normal TARGET_SYSTEM_ROOT is inside of $exec_prefix, - then consider it to relocate with the rest of the GCC installation -@@ -6138,10 +6099,6 @@ - - /* Read specs from a file if there is one. */ - -- machine_suffix = concat (spec_machine, dir_separator_str, -- spec_version, dir_separator_str, NULL); -- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL); -- - specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, 0); - /* Read the specs file unless it is a default one. */ - if (specs_file != 0 && strcmp (specs_file, "specs")) -@@ -6151,11 +6108,9 @@ - - /* We need to check standard_exec_prefix/just_machine_suffix/specs - for any override of as, ld and libraries. */ -- specs_file = alloca (strlen (standard_exec_prefix) -- + strlen (just_machine_suffix) + sizeof ("specs")); -+ specs_file = alloca (strlen (standard_exec_prefix) + sizeof ("specs")); - - strcpy (specs_file, standard_exec_prefix); -- strcat (specs_file, just_machine_suffix); - strcat (specs_file, "specs"); - if (access (specs_file, R_OK) == 0) - read_specs (specs_file, TRUE); -@@ -6172,17 +6127,6 @@ - for (i = 0; i < ARRAY_SIZE (driver_self_specs); i++) - do_self_spec (driver_self_specs[i]); - -- /* If not cross-compiling, look for executables in the standard -- places. */ -- if (*cross_compile == '0') -- { -- if (*md_exec_prefix) -- { -- add_prefix (&exec_prefixes, md_exec_prefix, "GCC", -- PREFIX_PRIORITY_LAST, 0, 0); -- } -- } -- - /* Process sysroot_suffix_spec. */ - if (*sysroot_suffix_spec != 0 - && do_spec_2 (sysroot_suffix_spec) == 0) -@@ -6228,49 +6172,12 @@ - } - /* We should eventually get rid of all these and stick to - startfile_prefix_spec exclusively. */ -- else if (*cross_compile == '0' || target_system_root) -+ else - { -- if (*md_startfile_prefix) -- add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix, -- "GCC", PREFIX_PRIORITY_LAST, 0, 1); -- -- if (*md_startfile_prefix_1) -- add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix_1, -- "GCC", PREFIX_PRIORITY_LAST, 0, 1); -- -- /* If standard_startfile_prefix is relative, base it on -- standard_exec_prefix. This lets us move the installed tree -- as a unit. If GCC_EXEC_PREFIX is defined, base -- standard_startfile_prefix on that as well. -- -- If the prefix is relative, only search it for native compilers; -- otherwise we will search a directory containing host libraries. */ -- if (IS_ABSOLUTE_PATH (standard_startfile_prefix)) -- add_sysrooted_prefix (&startfile_prefixes, -- standard_startfile_prefix, "BINUTILS", -- PREFIX_PRIORITY_LAST, 0, 1); -- else if (*cross_compile == '0') -- { -- if (gcc_exec_prefix) -- add_prefix (&startfile_prefixes, -- concat (gcc_exec_prefix, machine_suffix, -- standard_startfile_prefix, NULL), -- NULL, PREFIX_PRIORITY_LAST, 0, 1); -- add_prefix (&startfile_prefixes, -- concat (standard_exec_prefix, -- machine_suffix, -- standard_startfile_prefix, NULL), -- NULL, PREFIX_PRIORITY_LAST, 0, 1); -- } -- -- if (*standard_startfile_prefix_1) -- add_sysrooted_prefix (&startfile_prefixes, -- standard_startfile_prefix_1, "BINUTILS", -- PREFIX_PRIORITY_LAST, 0, 1); -- if (*standard_startfile_prefix_2) -- add_sysrooted_prefix (&startfile_prefixes, -- standard_startfile_prefix_2, "BINUTILS", -- PREFIX_PRIORITY_LAST, 0, 1); -+ add_prefix (&startfile_prefixes, standard_startfile_prefix, -+ "GCC", PREFIX_PRIORITY_LAST, 0, 1); -+ add_prefix (&startfile_prefixes, standard_startfile_prefix_1, -+ "GCC", PREFIX_PRIORITY_LAST, 0, 1); - } - - /* Process any user specified specs in the order given on the command -@@ -6306,7 +6213,7 @@ - - if (print_search_dirs) - { -- printf (_("install: %s%s\n"), standard_exec_prefix, machine_suffix); -+ printf (_("install: %s\n"), standard_exec_prefix); - printf (_("programs: %s\n"), build_search_list (&exec_prefixes, "", 0)); - printf (_("libraries: %s\n"), build_search_list (&startfile_prefixes, "", 0)); - return (0); diff --git a/gnu/usr.bin/cc41/cc_prep/patches/system.h.patch b/gnu/usr.bin/cc41/cc_prep/patches/system.h.patch deleted file mode 100644 index 437b8e6598..0000000000 --- a/gnu/usr.bin/cc41/cc_prep/patches/system.h.patch +++ /dev/null @@ -1,13 +0,0 @@ -$DragonFly: src/gnu/usr.bin/cc41/cc_prep/patches/system.h.patch,v 1.1 2006/09/27 12:10:34 corecode Exp $ - ---- system.h.orig 2005-02-24 00:11:06.000000000 +0100 -+++ system.h 2005-05-04 15:34:06.000000000 +0200 -@@ -582,7 +582,7 @@ - #undef strdup - #pragma GCC poison calloc strdup - --#if !defined(FLEX_SCANNER) && !defined(YYBISON) -+#if !defined(FLEX_SCANNER) && !defined(YYBISON) && !defined(YYBYACC) - #undef malloc - #undef realloc - #pragma GCC poison malloc realloc -- 2.41.0