* [PATCH] build: Fix missing variable quotes
@ 2024-06-14 0:53 Collin Funk
2024-06-14 1:01 ` Sam James
2024-06-14 10:46 ` Arthur Cohen
0 siblings, 2 replies; 7+ messages in thread
From: Collin Funk @ 2024-06-14 0:53 UTC (permalink / raw)
To: gcc-patches; +Cc: Collin Funk
When dlopen and pthread_create are in libc the variable is
set to "none required", therefore running configure will show
the following errors:
./configure: line 8997: test: too many arguments
./configure: line 8999: test: too many arguments
./configure: line 9003: test: too many arguments
./configure: line 9005: test: =: unary operator expected
ChangeLog:
* configure.ac: Quote variable result of AC_SEARCH_LIBS.
* configure: Regenerate.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
---
configure | 10 +++++-----
configure.ac | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index 51576a41f30..6e95b27d9df 100755
--- a/configure
+++ b/configure
@@ -8994,15 +8994,15 @@ if test "$ac_res" != no; then :
fi
-if test $ac_cv_search_dlopen = -ldl; then
+if test "$ac_cv_search_dlopen" = -ldl; then
CRAB1_LIBS="$CRAB1_LIBS -ldl"
-elif test $ac_cv_search_dlopen = no; then
+elif test "$ac_cv_search_dlopen" = no; then
missing_rust_dynlibs="libdl"
fi
-if test $ac_cv_search_pthread_create = -lpthread; then
+if test "$ac_cv_search_pthread_create" = -lpthread; then
CRAB1_LIBS="$CRAB1_LIBS -lpthread"
-elif test $ac_cv_search_pthread_crate = no; then
+elif test "$ac_cv_search_pthread_crate" = no; then
missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
fi
@@ -19746,7 +19746,7 @@ config.status
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
diff --git a/configure.ac b/configure.ac
index 5eda8dcdbf7..88576b31bfc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2045,15 +2045,15 @@ missing_rust_dynlibs=none
AC_SEARCH_LIBS([dlopen], [dl])
AC_SEARCH_LIBS([pthread_create], [pthread])
-if test $ac_cv_search_dlopen = -ldl; then
+if test "$ac_cv_search_dlopen" = -ldl; then
CRAB1_LIBS="$CRAB1_LIBS -ldl"
-elif test $ac_cv_search_dlopen = no; then
+elif test "$ac_cv_search_dlopen" = no; then
missing_rust_dynlibs="libdl"
fi
-if test $ac_cv_search_pthread_create = -lpthread; then
+if test "$ac_cv_search_pthread_create" = -lpthread; then
CRAB1_LIBS="$CRAB1_LIBS -lpthread"
-elif test $ac_cv_search_pthread_crate = no; then
+elif test "$ac_cv_search_pthread_crate" = no; then
missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
fi
--
2.45.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] build: Fix missing variable quotes
2024-06-14 0:53 [PATCH] build: Fix missing variable quotes Collin Funk
@ 2024-06-14 1:01 ` Sam James
2024-06-14 9:01 ` YunQiang Su
2024-06-14 10:46 ` Arthur Cohen
1 sibling, 1 reply; 7+ messages in thread
From: Sam James @ 2024-06-14 1:01 UTC (permalink / raw)
To: Collin Funk; +Cc: gcc-patches, cohenarthur
[-- Attachment #1: Type: text/plain, Size: 2886 bytes --]
Collin Funk <collin.funk1@gmail.com> writes:
> When dlopen and pthread_create are in libc the variable is
> set to "none required", therefore running configure will show
> the following errors:
>
> ./configure: line 8997: test: too many arguments
> ./configure: line 8999: test: too many arguments
> ./configure: line 9003: test: too many arguments
> ./configure: line 9005: test: =: unary operator expected
>
> ChangeLog:
>
> * configure.ac: Quote variable result of AC_SEARCH_LIBS.
> * configure: Regenerate.
This is PR115453 (which also needs to address a 'crate' typo).
>
> Signed-off-by: Collin Funk <collin.funk1@gmail.com>
> ---
> configure | 10 +++++-----
> configure.ac | 8 ++++----
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/configure b/configure
> index 51576a41f30..6e95b27d9df 100755
> --- a/configure
> +++ b/configure
> @@ -8994,15 +8994,15 @@ if test "$ac_res" != no; then :
> fi
>
>
> -if test $ac_cv_search_dlopen = -ldl; then
> +if test "$ac_cv_search_dlopen" = -ldl; then
> CRAB1_LIBS="$CRAB1_LIBS -ldl"
> -elif test $ac_cv_search_dlopen = no; then
> +elif test "$ac_cv_search_dlopen" = no; then
> missing_rust_dynlibs="libdl"
> fi
>
> -if test $ac_cv_search_pthread_create = -lpthread; then
> +if test "$ac_cv_search_pthread_create" = -lpthread; then
> CRAB1_LIBS="$CRAB1_LIBS -lpthread"
> -elif test $ac_cv_search_pthread_crate = no; then
> +elif test "$ac_cv_search_pthread_crate" = no; then
> missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
> fi
>
> @@ -19746,7 +19746,7 @@ config.status
> configured by $0, generated by GNU Autoconf 2.69,
> with options \\"\$ac_cs_config\\"
>
> -Copyright (C) 2012 Free Software Foundation, Inc.
> +Copyright (C) Free Software Foundation, Inc.
> This config.status script is free software; the Free Software Foundation
> gives unlimited permission to copy, distribute and modify it."
>
> diff --git a/configure.ac b/configure.ac
> index 5eda8dcdbf7..88576b31bfc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2045,15 +2045,15 @@ missing_rust_dynlibs=none
> AC_SEARCH_LIBS([dlopen], [dl])
> AC_SEARCH_LIBS([pthread_create], [pthread])
>
> -if test $ac_cv_search_dlopen = -ldl; then
> +if test "$ac_cv_search_dlopen" = -ldl; then
> CRAB1_LIBS="$CRAB1_LIBS -ldl"
> -elif test $ac_cv_search_dlopen = no; then
> +elif test "$ac_cv_search_dlopen" = no; then
> missing_rust_dynlibs="libdl"
> fi
>
> -if test $ac_cv_search_pthread_create = -lpthread; then
> +if test "$ac_cv_search_pthread_create" = -lpthread; then
> CRAB1_LIBS="$CRAB1_LIBS -lpthread"
> -elif test $ac_cv_search_pthread_crate = no; then
> +elif test "$ac_cv_search_pthread_crate" = no; then
> missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
> fi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] build: Fix missing variable quotes
2024-06-14 1:01 ` Sam James
@ 2024-06-14 9:01 ` YunQiang Su
2024-06-18 8:13 ` YunQiang Su
0 siblings, 1 reply; 7+ messages in thread
From: YunQiang Su @ 2024-06-14 9:01 UTC (permalink / raw)
To: Sam James; +Cc: Collin Funk, gcc-patches, cohenarthur
Sam James <sam@gentoo.org> 于2024年6月14日周五 09:02写道:
>
> Collin Funk <collin.funk1@gmail.com> writes:
>
> > When dlopen and pthread_create are in libc the variable is
> > set to "none required", therefore running configure will show
> > the following errors:
> >
> > ./configure: line 8997: test: too many arguments
> > ./configure: line 8999: test: too many arguments
> > ./configure: line 9003: test: too many arguments
> > ./configure: line 9005: test: =: unary operator expected
> >
> > ChangeLog:
> >
> > * configure.ac: Quote variable result of AC_SEARCH_LIBS.
> > * configure: Regenerate.
>
> This is PR115453 (which also needs to address a 'crate' typo).
>
I noticed another similar problem. I guess that we can put them in a
single patch:
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5317,7 +5327,7 @@ x:
AC_MSG_CHECKING(assembler and linker for explicit JALR relocation)
gcc_cv_as_ld_jalr_reloc=no
- if test $gcc_cv_as_mips_explicit_relocs = yes; then
+ if test x$gcc_cv_as_mips_explicit_relocs = xyes; then
if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a
"$gcc_cv_gld_minor_version" -ge 20 -o "$gcc_cv_gld_major_version" -gt
2 \
&& test $in_tree_ld_is_elf = yes; then
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] build: Fix missing variable quotes
2024-06-14 0:53 [PATCH] build: Fix missing variable quotes Collin Funk
2024-06-14 1:01 ` Sam James
@ 2024-06-14 10:46 ` Arthur Cohen
1 sibling, 0 replies; 7+ messages in thread
From: Arthur Cohen @ 2024-06-14 10:46 UTC (permalink / raw)
To: Collin Funk, gcc-patches
Hi Collin,
Sorry about the mess. As Sam pointed out, there was already a patch
proposed in the bugzilla PR which I've posted on the ML as well for
review. The only difference with your patch is that it also changes
ac_cv_search_pthread_crate to ac_cv_search_pthread_create, as otherwise
the check will always be false.
Best,
Arthur
On 6/14/24 02:53, Collin Funk wrote:
> When dlopen and pthread_create are in libc the variable is
> set to "none required", therefore running configure will show
> the following errors:
>
> ./configure: line 8997: test: too many arguments
> ./configure: line 8999: test: too many arguments
> ./configure: line 9003: test: too many arguments
> ./configure: line 9005: test: =: unary operator expected
>
> ChangeLog:
>
> * configure.ac: Quote variable result of AC_SEARCH_LIBS.
> * configure: Regenerate.
>
> Signed-off-by: Collin Funk <collin.funk1@gmail.com>
> ---
> configure | 10 +++++-----
> configure.ac | 8 ++++----
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/configure b/configure
> index 51576a41f30..6e95b27d9df 100755
> --- a/configure
> +++ b/configure
> @@ -8994,15 +8994,15 @@ if test "$ac_res" != no; then :
> fi
>
>
> -if test $ac_cv_search_dlopen = -ldl; then
> +if test "$ac_cv_search_dlopen" = -ldl; then
> CRAB1_LIBS="$CRAB1_LIBS -ldl"
> -elif test $ac_cv_search_dlopen = no; then
> +elif test "$ac_cv_search_dlopen" = no; then
> missing_rust_dynlibs="libdl"
> fi
>
> -if test $ac_cv_search_pthread_create = -lpthread; then
> +if test "$ac_cv_search_pthread_create" = -lpthread; then
> CRAB1_LIBS="$CRAB1_LIBS -lpthread"
> -elif test $ac_cv_search_pthread_crate = no; then
> +elif test "$ac_cv_search_pthread_crate" = no; then
> missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
> fi
>
> @@ -19746,7 +19746,7 @@ config.status
> configured by $0, generated by GNU Autoconf 2.69,
> with options \\"\$ac_cs_config\\"
>
> -Copyright (C) 2012 Free Software Foundation, Inc.
> +Copyright (C) Free Software Foundation, Inc.
> This config.status script is free software; the Free Software Foundation
> gives unlimited permission to copy, distribute and modify it."
>
> diff --git a/configure.ac b/configure.ac
> index 5eda8dcdbf7..88576b31bfc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2045,15 +2045,15 @@ missing_rust_dynlibs=none
> AC_SEARCH_LIBS([dlopen], [dl])
> AC_SEARCH_LIBS([pthread_create], [pthread])
>
> -if test $ac_cv_search_dlopen = -ldl; then
> +if test "$ac_cv_search_dlopen" = -ldl; then
> CRAB1_LIBS="$CRAB1_LIBS -ldl"
> -elif test $ac_cv_search_dlopen = no; then
> +elif test "$ac_cv_search_dlopen" = no; then
> missing_rust_dynlibs="libdl"
> fi
>
> -if test $ac_cv_search_pthread_create = -lpthread; then
> +if test "$ac_cv_search_pthread_create" = -lpthread; then
> CRAB1_LIBS="$CRAB1_LIBS -lpthread"
> -elif test $ac_cv_search_pthread_crate = no; then
> +elif test "$ac_cv_search_pthread_crate" = no; then
> missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
> fi
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] build: Fix missing variable quotes
2024-06-14 9:01 ` YunQiang Su
@ 2024-06-18 8:13 ` YunQiang Su
2024-06-18 8:33 ` Sam James
0 siblings, 1 reply; 7+ messages in thread
From: YunQiang Su @ 2024-06-18 8:13 UTC (permalink / raw)
To: Sam James; +Cc: Collin Funk, gcc-patches, cohenarthur
OK for trunk?
--
YunQiang Su
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] build: Fix missing variable quotes
2024-06-18 8:13 ` YunQiang Su
@ 2024-06-18 8:33 ` Sam James
2024-06-18 10:33 ` Richard Biener
0 siblings, 1 reply; 7+ messages in thread
From: Sam James @ 2024-06-18 8:33 UTC (permalink / raw)
To: YunQiang Su; +Cc: Collin Funk, gcc-patches, cohenarthur, rguenth
YunQiang Su <wzssyqa@gmail.com> writes:
> OK for trunk?
It looks good to me, but I can't approve. (I'd dare say it's obvious,
even.)
Richard, any chance you could give it a quick ack?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] build: Fix missing variable quotes
2024-06-18 8:33 ` Sam James
@ 2024-06-18 10:33 ` Richard Biener
0 siblings, 0 replies; 7+ messages in thread
From: Richard Biener @ 2024-06-18 10:33 UTC (permalink / raw)
To: Sam James; +Cc: YunQiang Su, Collin Funk, gcc-patches, cohenarthur
On Tue, Jun 18, 2024 at 10:35 AM Sam James <sam@gentoo.org> wrote:
>
> YunQiang Su <wzssyqa@gmail.com> writes:
>
> > OK for trunk?
>
> It looks good to me, but I can't approve. (I'd dare say it's obvious,
> even.)
>
> Richard, any chance you could give it a quick ack?
OK
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-06-18 10:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14 0:53 [PATCH] build: Fix missing variable quotes Collin Funk
2024-06-14 1:01 ` Sam James
2024-06-14 9:01 ` YunQiang Su
2024-06-18 8:13 ` YunQiang Su
2024-06-18 8:33 ` Sam James
2024-06-18 10:33 ` Richard Biener
2024-06-14 10:46 ` Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).