On Tue, Jul 15, 2025 at 2:51 PM John Ericson
<John.Ericson@obsidian.systems> wrote:
>
> This dates back to the creation of top-level `libgcc` in
> fa9585134f6f58fa0d3da3ca4ad5493855aea2dc. I strongly suspect that this
> does nothing.

So looking into this further, MACHMODE_H used part of LIBGCC_DEPS
because of TM_H and r0-78222-gfa9585134f6f58 moved away from including
tm.h from libgcc. It was copied over unused.

>
> (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-hanging fruit -- this is the only direct mention of
> `insn-modes.h` in libgcc.)

There are only a few things left:
GCC_CFLAGS; `$(CFLAGS_FOR_TARGET) $(INTERNAL_CFLAGS) $(T_CFLAGS)
$(LOOSE_WARN) $(C_LOOSE_WARN)` I am not sure how to remove that.
INHIBIT_LIBC_CFLAGS; looks complicated to remove
TARGET_SYSTEM_ROOT; this one should be easy I think; just `$CC
-print-sysroot` should print it out ...
NO_PIE_CFLAGS; check if __PIE__ is defined by the compiler and if so
add -fno-PIE to the CFLAGS

Thanks,
Andrew Pinski

> ---
>  libgcc/Makefile.in | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
> index 0719fd0615d..f7b48dceb06 100644
> --- a/libgcc/Makefile.in
> +++ b/libgcc/Makefile.in
> @@ -193,7 +193,6 @@ AWK = @AWK@
>  GCC_FOR_TARGET = $(CC)
>  LIPO = @LIPO@
>  LIPO_FOR_TARGET = $(LIPO)
> -MACHMODE_H = machmode.h mode-classes.def insn-modes.h
>  NM = @NM@
>  NM_FOR_TARGET = $(NM)
>  RANLIB_FOR_TARGET = $(RANLIB)
> @@ -220,7 +219,6 @@ export INSTALL_DATA
>  export LIB1ASMSRC
>  export LIBGCC2_CFLAGS
>  export LIPO_FOR_TARGET
> -export MACHMODE_H
>  export NM_FOR_TARGET
>  export STRIP_FOR_TARGET
>  export RANLIB_FOR_TARGET
> --
> 2.47.2
>

Reply via email to