Re: [pushed]PR modula2/125129: Many tests fail to link on FreeBSD
Andreas Schwab <[email protected]>
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <[email protected]> |
On Aug 12 2026, Gaius Mulley wrote:
> diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
> index 11079927eb8..dd4d6e688d6 100644
> --- a/gcc/m2/Make-lang.in
> +++ b/gcc/m2/Make-lang.in
> @@ -38,6 +38,13 @@ GM2_1 = ./gm2 -B./m2/stage1 -g -fm2-g $(CM2DEP)
>
> GM2_FOR_TARGET = $(STAGE_CC_WRAPPER) ./gm2 -B./ -B$(build_tooldir)/bin/ -L$(objdir)/../ld $(TFLAGS)
>
> +define escape_path
> +$(shell echo "$(1)" | sed 's/ /\\ /g')
> +endef
> +
> +GM2_FOR_TARGET_ESC := $(call escape_path,$(GM2_FOR_TARGET))
> +
> +
Why do you need that? Why can't you just put $(GM2_FOR_TARGET) in
quotes, like it is done in all other places? That doesn't even quote
all meta characters.
> diff --git a/gcc/m2/tools-src/mktargetsrc.py b/gcc/m2/tools-src/mktargetsrc.py
> new file mode 100644
> index 00000000000..cd61ecec87c
> --- /dev/null
> +++ b/gcc/m2/tools-src/mktargetsrc.py
> +def stripBackslash(compiler):
> + compiler = compiler.replace("\\ ", " ")
> + return compiler
You do not need that, the backslashes are already stripped by the shell.
--
Andreas Schwab, SUSE Labs, [email protected]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."