SHA256
7
0
forked from pool/gcc15
Files
gcc15/gcc-add-defaultsspec.diff
Richard Biener e0a5150463 - New package, inherits from gcc14
- Take patches inherited from GCC 14.
  * gcc-add-defaultsspec.diff, add the ability to provide a specs
    file that is read by default
  * tls-no-direct.diff, avoid direct %fs references on x86 to not
    slow down Xen
  * gcc43-no-unwind-tables.diff, do not produce unwind tables for
    CRT files
  * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr
    for ppc, just a testcase
  * gcc44-textdomain.patch, make translation files version specific
    and adjust textdomain to find them
  * gcc44-rename-info-files.patch, fix cross-references in info files
    when renaming them to be version specific
  * gcc48-libstdc++-api-reference.patch, fix link in the installed
    libstdc++ html documentation
  * gcc7-remove-Wexpansion-to-defined-from-Wextra.patch, removes
    new warning from -Wextra
  * gcc7-avoid-fixinc-error.diff
  * gcc9-reproducible-builds-buildid-for-checksum.patch
  * gcc9-reproducible-builds.patch
  * gcc11-gdwarf-4-default.patch, default to -gdwarf-4 on old products

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc15?expand=0&rev=1
2025-01-20 15:02:44 +00:00

52 lines
2.0 KiB
Diff

Index: gcc/gcc.cc
===================================================================
--- gcc/gcc.cc.orig 2013-11-26 15:41:59.000000000 +0100
+++ gcc/gcc.cc 2013-11-26 16:40:35.780548125 +0100
@@ -258,6 +258,7 @@ static const char *replace_outfile_spec_
static const char *remove_outfile_spec_function (int, const char **);
static const char *version_compare_spec_function (int, const char **);
static const char *include_spec_function (int, const char **);
+static const char *include_noerr_spec_function (int, const char **);
static const char *find_file_spec_function (int, const char **);
static const char *find_plugindir_spec_function (int, const char **);
static const char *print_asm_header_spec_function (int, const char **);
@@ -1357,6 +1358,7 @@ static const struct spec_function static
{ "remove-outfile", remove_outfile_spec_function },
{ "version-compare", version_compare_spec_function },
{ "include", include_spec_function },
+ { "include_noerr", include_noerr_spec_function },
{ "find-file", find_file_spec_function },
{ "find-plugindir", find_plugindir_spec_function },
{ "print-asm-header", print_asm_header_spec_function },
@@ -6480,6 +6482,8 @@ main (int argc, char **argv)
if (access (specs_file, R_OK) == 0)
read_specs (specs_file, true, false);
+ do_self_spec ("%:include_noerr(defaults.spec)%(default_spec)");
+
/* Process any configure-time defaults specified for the command line
options, via OPTION_DEFAULT_SPECS. */
for (i = 0; i < ARRAY_SIZE (option_default_specs); i++)
@@ -8401,6 +8405,21 @@ get_random_number (void)
return ret ^ getpid ();
}
+static const char *
+include_noerr_spec_function (int argc, const char **argv)
+{
+ char *file;
+
+ if (argc != 1)
+ abort ();
+
+ file = find_a_file (&startfile_prefixes, argv[0], R_OK, 0);
+ if (file)
+ read_specs (file, FALSE, TRUE);
+
+ return NULL;
+}
+
/* %:compare-debug-dump-opt spec function. Save the last argument,
expected to be the last -fdump-final-insns option, or generate a
temporary. */