[PATCH] Libraries' configure scripts should not read config-ml.in when multilib is disabled

2018-07-30 Thread John Ericson
apologies.] From 3e0e7d6e5cfdc46342fcad5fe6b24b4f47af0d87 Mon Sep 17 00:00:00 2001 Message-Id: <3e0e7d6e5cfdc46342fcad5fe6b24b4f47af0d87.1532988611.git.John.Ericson@Obsidian.Systems> From: John Ericson Date: Mon, 30 Jul 2018 18:06:02 -0400 Subject: [PATCH] multilib: Don't bother with multilib configurat

Re: [PATCH] Libraries' configure scripts should not read config-ml.in when multilib is disabled

2018-07-30 Thread John Ericson
On 07/30/18 19:48, Joseph Myers wrote: On the contrary, I think an important principle here is that non-multilib and multilib builds follow the same code paths as far as possible, with the multilib variables just set to trivial values (modulo osdirname) in the case of a non-multilib build - a non

[PATCH] Factor out `find_a_program` helper around `find_a_file`

2021-08-04 Thread John Ericson
The helper is for `--print-prog-name` and similar things. Since all executable finding goes through it, we can move the default overrides into that path too. This also ensures that if some is looking for a *non*-program that called `as`, `ld`, etc., weird things don't happen. --- gcc/gcc.c | 59 ++

Re: Optional machine prefix for programs in for -B dirs

2021-08-17 Thread John Ericson
OK I have polished off my code in light of previous discussion and will submit it in follow-up emails. As mentioned before, this patch series is on top of the non-behavior-changing cleanup I previously submitted in https://gcc.gnu.org/pipermail/gcc-patches/2021-August/576725.html The first patch

[PATCH 3/3] find_a_program: Only search for prefixed paths in undisambiguated dirs

2021-08-17 Thread John Ericson
This means, we might search for: - path/$machine/$version/prog - path/$machine/prog - path/$machine-prog But not - path/$machine/$version/$machine-prog because disambiguating $machine twice is unnecessary. This does mean we less liberal in what we accept than LLVM, but that's OK. The down side

[PATCH 1/3] find_a_program: First search with machine prefix

2021-08-17 Thread John Ericson
This matches the behavior of Clang, and makes it easier to work with cross compilers without heeding to hard-code paths at build time. --- gcc/gcc.c | 78 --- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/gcc/gcc.c b/gcc/gcc.c i

[PATCH 2/3] driver: for_each_pass: Pass to callback whether dir is machine-disambiguated

2021-08-17 Thread John Ericson
We will use this in the subsequent diff to control what basenames we search for. In machine-specific subdirectories, we should just look for the original basename, but in machine-agnostic subdirectories, we might additionally look for prefixed disambiguated names, as an alternate method of keeping

[PATCH v2] Allow explicitly specifying the thread model for runtime libs

2021-08-21 Thread John Ericson
Previously, they always scraped the thread mode from `$CC -v', now, that is the default but one may pass `--with-threads=MODEL` to be explicit instead. One use-case is bootstraping with a shorter critical path. The traditionally route was to build an entire "static stage" GCC, build libc, and then

[PATCH] Factor out thread model detection with `GCC_AC_THREAD_MODEL`

2025-07-13 Thread John Ericson
From: John Ericson This macro deduplicates the $CC -v 2>&1 | sed -n 's/^Thread model: //p' check that was occurring in various runtime libs. Additionally, as a bit of an Easter egg, this also allows overriding what the compiler would return by setting the `gcc_cv_target_t

Re: [PATCH] Allow explicitly specifying the thread model for runtime libs

2025-07-13 Thread John Ericson
at 11:02 AM, John Ericson wrote: > Hello, this 4-year-old patch of mine was never reviewed. Per > https://github.com/NixOS/nixpkgs/pull/414299, we in a package set / distro, > Nixpkgs/NixOS, just began (albeit on an experimental basis) packaging GCC > with this patch (among others)

Re: [PATCH] Allow explicitly specifying the thread model for runtime libs

2025-07-11 Thread John Ericson
there, so a good one to start with. (I think it would be unnecessary complicated to discuss them all at once.) Thanks in advance, John On Wed, Aug 18, 2021, at 4:38 PM, John Ericson wrote: > From: John Ericson > > Previously, they always scraped the thread mode from `$CC -v', now,

[PATCH] libgcc/Makefile.in: Delete `MACHMODE_H` def

2025-07-15 Thread John Ericson
This dates back to the creation of top-level `libgcc` in fa9585134f6f58fa0d3da3ca4ad5493855aea2dc. I strongly suspect that this does nothing. (For context, my overall goal here is hoping libgcc can depend on fewer/no stuff that is generated by `gcc/Makefile`. This is me trying to pluck some low-ha

[PATCH v2] libgcc/Makefile.in: Delete dead `MACHMODE_H` variable

2025-07-16 Thread John Ericson
This dates back to the creation of top-level `libgcc` in fa9585134f6f58fa0d3da3ca4ad5493855aea2dc. I strongly suspect that this does nothing. Andrew Pinksi adds: > So looking into this further, MACHMODE_H used part of LIBGCC_DEPS > because of TM_H and r0-78222-gfa9585134f6f58 moved away from incl

[PATCH v3] Factor out thread model detection with new `GCC_AC_THREAD_MODEL` macro

2025-07-16 Thread John Ericson
This macro deduplicates the $CC -v 2>&1 | sed -n 's/^Thread model: //p' check that was occurring in various runtime libs. Additionally, as a bit of an Easter egg, this also allows overriding what the compiler would return by setting the `gcc_cv_target_thread_file` cache variable first. I adm

[PATCH v2] Move NO_PIE_CFLAGS logic from gcc to libgcc

2025-07-16 Thread John Ericson
From: John Ericson My goal is to be able to build libgcc cleanly in isolation --- today one needs to figure `make ...` misc things in the gcc subdir. Following Andrew Pinski's suggestions in https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689683.html, this commit moves the NO_PIE_C

[PATCH 1/2] Move NO_PIE_CFLAGS logic from gcc to libgcc

2025-07-16 Thread John Ericson
From: John Ericson My goal is to be able to build libgcc cleanly in isolation --- today one needs to figure `make ...` misc things in the gcc subdir. Following Andrew Pinski's suggestions in https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689683.html, this commit moves the NO_PIE_C

[PATCH 2/2] libgcc: Dont use TARGET_SYSTEM_ROOT from gcc

2025-07-16 Thread John Ericson
From: John Ericson Following Andrew Pinski's suggestions in https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689683.html, just use the output of: $(CC) -print-sysroot It is just used in one spot, in an AIX code-path. I just made (within make) a shell variable to use instead. I

[PATCH v3 1/2] Move NO_PIE_CFLAGS logic from gcc to libgcc

2025-07-16 Thread John Ericson
From: John Ericson My goal is to be able to build libgcc cleanly in isolation --- today one needs to figure `make ...` misc things in the gcc subdir. Following Andrew Pinski's suggestions in https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689683.html, this commit moves the NO_PIE_C

[PATCH v3 2/2] libgcc: Dont use TARGET_SYSTEM_ROOT from gcc

2025-07-16 Thread John Ericson
From: John Ericson Following Andrew Pinski's suggestions in https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689683.html, just use the output of: $(CC) -print-sysroot It is just used in one spot, in an AIX code-path. I just made (within make) a shell variable to use instead. I

[PATCH] Use regular libdir/includedir in libgcc Makefiles

2025-07-17 Thread John Ericson
* Makefile.in: Use regular libdir/includedir, no more libsubdir etc. * config/t-slibgcc-vms: Use regular libdir, no more libsubdir. * configure: Regenerate. * configure.ac: Stash away the passed libdir as orig_libdir, and define libdir and includedir to matc

[PATCH] Use regular libdir/includedir in libssp Makefiles

2025-07-20 Thread John Ericson
libdir as orig_libdir, and define libdir and includedir to match what Makefile.in used to do. Signed-off-by: John Ericson --- libssp/Makefile.am | 6 +-- libssp/Makefile.in | 113 +--- libssp/configure| 12 +++-- libssp/configure.ac

Re: [PATCH] Use regular libdir/includedir in libgcc Makefiles

2025-08-02 Thread John Ericson
> and "get those settings passed down from top level" is one plausible end > state - sharing logic implicitly that way rather than expanding it all > locally in each target library configure script, even if expanding it > locally for each library is useful as an intermediate stage.) Correct m

[PATCH v4] Move NO_PIE_CFLAGS logic from gcc to libgcc

2025-07-30 Thread John Ericson
make variable via autoconf substitution. * configure: Regenerate. * configure.ac: New configure check to define NO_PIE_CFLAGS using the algorithm Andrew asked for in the linked mail. Suggested-by: Andrew Pinski Signed-off-by: John Ericson --- gcc/Makefile.in

[PATCH v4] Factor out thread model detection with new `GCC_AC_THREAD_MODEL` macro

2025-07-30 Thread John Ericson
This macro deduplicates the $CC -v 2>&1 | sed -n 's/^Thread model: //p' check that was occurring in various runtime libs. Additionally, as a bit of an Easter egg, this also allows overriding what the compiler would return by setting the `gcc_cv_target_thread_file` cache variable first. I adm

Re: [PATCH] Use regular libdir/includedir in libgcc Makefiles

2025-08-04 Thread John Ericson
On Mon, Aug 4, 2025, at 4:02 PM, Joseph Myers wrote: > On Sun, 3 Aug 2025, John Ericson wrote: > > > > and "get those settings passed down from top level" is one plausible > > > end state - sharing logic implicitly that way rather than expanding it > &

[PATCH] Allow explicitly specifying the thread model for runtime libs

2021-08-18 Thread John Ericson via Gcc-patches
From: John Ericson Previously, they always scraped the thread mode from `$CC -v', now, that is the default but one may pass `--with-threads=MODEL` to be explicit instead. One use-case is bootstraping with a shorter critical path. The traditionally route was to build an entire "static