diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2018-01-21 10:41:25 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2018-07-23 18:41:06 +0100 |
commit | 1cc0b782f108f483715ad6810c112d668d2fd60e (patch) | |
tree | d3b8c30f50959af67e67be34b6d2b81e3fcf1605 | |
parent | 67055d78ae0c19f26a0158ebc353ab210e93208a (diff) | |
download | toolchains-1cc0b782f108f483715ad6810c112d668d2fd60e.tar.gz toolchains-1cc0b782f108f483715ad6810c112d668d2fd60e.tar.bz2 |
Revert removal of path code
-rw-r--r-- | m68k-unknown-amigaos/recipes/patches/gcc/gcc6.p | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/m68k-unknown-amigaos/recipes/patches/gcc/gcc6.p b/m68k-unknown-amigaos/recipes/patches/gcc/gcc6.p index 86e283b..a727fd3 100644 --- a/m68k-unknown-amigaos/recipes/patches/gcc/gcc6.p +++ b/m68k-unknown-amigaos/recipes/patches/gcc/gcc6.p @@ -8848,7 +8848,7 @@ index 000000000000..3f3aafc5f254 + "%{mcrt=nix*:%(lib_libnix)} " \ + "%{mcrt=ixemul:%(lib_ixemul)} " \ + "%{mcrt=clib2:%(lib_clib2)} " \ -+ "%{!noixemul:%{!mcrt*:%(lib_libnix)}}" ++ "%{!noixemul:%{!mcrt*:%(lib_clib2)}}" +#endif + +#define LIBGCC_IXEMUL_SPEC "" @@ -8975,10 +8975,10 @@ index 000000000000..3f3aafc5f254 + "%{T*} }}}}}} " +#endif + -+/*extern const char * amiga_m68k_prefix_func(int, const char **);*/ ++extern const char * amiga_m68k_prefix_func(int, const char **); + -+/*#define EXTRA_SPEC_FUNCTIONS \ -+ { "sdk_root", amiga_m68k_prefix_func },*/ ++#define EXTRA_SPEC_FUNCTIONS \ ++ { "sdk_root", amiga_m68k_prefix_func }, + +/* This macro defines names of additional specifications to put in the specs + that can be used in various specifications like CC1_SPEC. Its definition @@ -9821,6 +9821,51 @@ index 6942a504127f..ebe3e1c37121 100644 #include "stringpool.h" #include "expmed.h" #include "optabs.h" +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 85ea19bd3a09..a4da7d515ce5 100644 +--- gcc/gcc.c ++++ gcc/gcc.c +@@ -10107,3 +10107,40 @@ driver_get_configure_time_options (void (*cb) (const char *option, + obstack_free (&obstack, NULL); + n_switches = 0; + } ++ ++#ifdef TARGET_AMIGA ++const char * amiga_m68k_prefix_func(int argc, const char ** argv) { ++ char * p = 0; ++ if (standard_libexec_prefix) ++ { ++ char * glp = concat(standard_libexec_prefix, "", NULL); ++ p = strrchr(glp, '/'); ++ if (p) ++ { ++ *p = 0; ++ p = strrchr(glp, '/'); ++ if (p) ++ { ++ *p = 0; ++ p = strrchr(glp, '/'); ++ if (p) ++ { ++ p[1] = 0; ++ p = concat(glp, "m68k-amigaos/", NULL); ++ } ++ } ++ } ++ free(glp); ++ } ++ if (!p) ++ p = concat("../../../../", "", NULL); ++ ++ for (int i = 0; i < argc; ++i) { ++ char * q = concat(p, argv[i], NULL); ++ free(p); ++ p = q; ++ } ++// printf("amiga_m68k_prefix_func='%s'\n", p); ++ return p; ++} ++#endif diff --git a/gcc/gcse.c b/gcc/gcse.c index 5b2c96ecb5a6..f74e733f9337 100644 --- gcc/gcse.c |