Re: [PATCH] Use $(CC) instead of gcc to avoid relying on the host gcc.

2023-01-30 Thread Flávio Cruz
On Mon, Jan 30, 2023 at 6:51 PM Guillem Jover  wrote:

> On Mon, 2023-01-30 at 12:43:09 +0300, Sergey Bugaev wrote:
> > it would be nicer if you explicitly specified what source tree this
> > patch is for, for instance: [PATCH glibc] or [PATCH gnumach] instead
> > of just [PATCH]. (There is the --subject-prefix option in git
> > format-patch for this.)
>
> Right, and in case this is not obvious, you can configure it
> permanently per repo with something like:
>
>   $ git config format.subjectprefix "PATCH gnumach"
>

Thanks Guillem and Sergey! I ended up with a git alias to format patches
with the subject prefix as [PATCH ]:

git config --global alias.format-patch-repo '!git format-patch
--subject-prefix="PATCH $(basename $(git rev-parse --show-toplevel))"'


> Thanks,
> Guillem
>


Re: [PATCH] Use $(CC) instead of gcc to avoid relying on the host gcc.

2023-01-30 Thread Guillem Jover
On Mon, 2023-01-30 at 12:43:09 +0300, Sergey Bugaev wrote:
> it would be nicer if you explicitly specified what source tree this
> patch is for, for instance: [PATCH glibc] or [PATCH gnumach] instead
> of just [PATCH]. (There is the --subject-prefix option in git
> format-patch for this.)

Right, and in case this is not obvious, you can configure it
permanently per repo with something like:

  $ git config format.subjectprefix "PATCH gnumach"

Thanks,
Guillem



Re: [PATCH] Use $(CC) instead of gcc to avoid relying on the host gcc.

2023-01-30 Thread Samuel Thibault
Applied, thanks!

Flavio Cruz, le lun. 30 janv. 2023 02:26:59 -0500, a ecrit:
> ---
>  Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 10d030b8..e31a875d 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -41,7 +41,7 @@ AM_LDFLAGS =
>  # Compilation flags
>  #
>  
> -GCC_INSTALL = $(shell LANG=C gcc -print-search-dirs | sed -n -e 's/install: 
> \(.*\)/\1/p')
> +GCC_INSTALL = $(shell LANG=C $(CC) -print-search-dirs | sed -n -e 
> 's/install: \(.*\)/\1/p')
>  AM_CPPFLAGS += \
>   -imacros config.h -I $(GCC_INSTALL)/include
>  
> -- 
> 2.39.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



Re: [PATCH] Use $(CC) instead of gcc to avoid relying on the host gcc.

2023-01-30 Thread Sergey Bugaev
A humble meta-suggestion, if I might:

it would be nicer if you explicitly specified what source tree this
patch is for, for instance: [PATCH glibc] or [PATCH gnumach] instead
of just [PATCH]. (There is the --subject-prefix option in git
format-patch for this.)

This is typically easy to infer by looking at the file paths, e.g.
sysdeps/htl clearly points at glibc, kern/task.c is naturally GNU
Mach, rumpdisk/main.c is of course the Hurd proper. But just
Makefile.am — I don't know what this is. Is this GNU Mach, GNU MIG,
glibc, the Hurd, something else? (Actually, looking at the actual
patch, this seems to be GNU Mach.)

Thanks for your work!

Sergey



[PATCH] Use $(CC) instead of gcc to avoid relying on the host gcc.

2023-01-29 Thread Flavio Cruz
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 10d030b8..e31a875d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,7 +41,7 @@ AM_LDFLAGS =
 # Compilation flags
 #
 
-GCC_INSTALL = $(shell LANG=C gcc -print-search-dirs | sed -n -e 's/install: 
\(.*\)/\1/p')
+GCC_INSTALL = $(shell LANG=C $(CC) -print-search-dirs | sed -n -e 's/install: 
\(.*\)/\1/p')
 AM_CPPFLAGS += \
-imacros config.h -I $(GCC_INSTALL)/include
 
-- 
2.39.0