public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined
@ 2023-10-30 11:42 Xi Ruoyao
  2023-10-30 11:50 ` chenglulu
  0 siblings, 1 reply; 5+ messages in thread
From: Xi Ruoyao @ 2023-10-30 11:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: chenglulu, i, xuchenghua, Xi Ruoyao

Now loongarch.md uses HAVE_AS_TLS, we need this to fix the failure
building a cross compiler if the cross assembler is not installed yet.

gcc/ChangeLog:

	* config/loongarch/loongarch-opts.h (HAVE_AS_TLS): Define to 0
	if not defined yet.
---

Ok for trunk?

 gcc/config/loongarch/loongarch-opts.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/config/loongarch/loongarch-opts.h b/gcc/config/loongarch/loongarch-opts.h
index 2756939b05d..f204828015e 100644
--- a/gcc/config/loongarch/loongarch-opts.h
+++ b/gcc/config/loongarch/loongarch-opts.h
@@ -101,4 +101,8 @@ loongarch_update_gcc_opt_status (struct loongarch_target *target,
 #define HAVE_AS_MRELAX_OPTION 0
 #endif
 
+#ifndef HAVE_AS_TLS
+#define HAVE_AS_TLS 0
+#endif
+
 #endif /* LOONGARCH_OPTS_H */
-- 
2.42.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined
  2023-10-30 11:42 [PATCH] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined Xi Ruoyao
@ 2023-10-30 11:50 ` chenglulu
  2023-10-30 12:26   ` Xi Ruoyao
  0 siblings, 1 reply; 5+ messages in thread
From: chenglulu @ 2023-10-30 11:50 UTC (permalink / raw)
  To: Xi Ruoyao, gcc-patches; +Cc: i, xuchenghua


在 2023/10/30 下午7:42, Xi Ruoyao 写道:
> Now loongarch.md uses HAVE_AS_TLS, we need this to fix the failure
> building a cross compiler if the cross assembler is not installed yet.
>
> gcc/ChangeLog:
>
> 	* config/loongarch/loongarch-opts.h (HAVE_AS_TLS): Define to 0
> 	if not defined yet.
> ---
>
> Ok for trunk?
I have no problem with this submission, but I don't understand the 
circumstances surrounding the error.
>
>   gcc/config/loongarch/loongarch-opts.h | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/gcc/config/loongarch/loongarch-opts.h b/gcc/config/loongarch/loongarch-opts.h
> index 2756939b05d..f204828015e 100644
> --- a/gcc/config/loongarch/loongarch-opts.h
> +++ b/gcc/config/loongarch/loongarch-opts.h
> @@ -101,4 +101,8 @@ loongarch_update_gcc_opt_status (struct loongarch_target *target,
>   #define HAVE_AS_MRELAX_OPTION 0
>   #endif
>   
> +#ifndef HAVE_AS_TLS
> +#define HAVE_AS_TLS 0
> +#endif
> +
>   #endif /* LOONGARCH_OPTS_H */


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined
  2023-10-30 11:50 ` chenglulu
@ 2023-10-30 12:26   ` Xi Ruoyao
  2023-10-30 12:44     ` chenglulu
  0 siblings, 1 reply; 5+ messages in thread
From: Xi Ruoyao @ 2023-10-30 12:26 UTC (permalink / raw)
  To: chenglulu, gcc-patches; +Cc: i, xuchenghua

On Mon, 2023-10-30 at 19:50 +0800, chenglulu wrote:
> 在 2023/10/30 下午7:42, Xi Ruoyao 写道:
> > Now loongarch.md uses HAVE_AS_TLS, we need this to fix the failure
> > building a cross compiler if the cross assembler is not installed yet.
> > 
> > gcc/ChangeLog:
> > 
> >  	* config/loongarch/loongarch-opts.h (HAVE_AS_TLS): Define to 0
> >  	if not defined yet.
> > ---
> > 
> > Ok for trunk?
> I have no problem with this submission, but I don't understand the 
> circumstances surrounding the error.

When the developers hack GCC they sometimes build a cross compiler with
no cross assembler, then HAVE_AS_TLS will just be undefined.  And in the
future we may have an assmebler w/o TLS support (for example a tiny
assembler for bare-metal target), then HAVE_AS_TLS will be undefined
too.

The error message is:

g++ -c   -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include  -I../../gcc/gcc/../libcpp/include  \
	-o build/gencondmd.o build/gencondmd.cc
../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
 3655 |   "HAVE_AS_TLS"
      |  ^~~~~~~~~~~
../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
 3655 |   "HAVE_AS_TLS"
      |  ^~~~~~~~~~~
../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
 3655 |   "HAVE_AS_TLS"
      |  ^~~~~~~~~~~
../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
 3655 |   "HAVE_AS_TLS"
      |  ^~~~~~~~~~~
make[1]: *** [Makefile:2962: build/gencondmd.o] Error 1

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined
  2023-10-30 12:26   ` Xi Ruoyao
@ 2023-10-30 12:44     ` chenglulu
  2023-10-31  6:48       ` Pushed: [PATCH v2] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined [PR112299] Xi Ruoyao
  0 siblings, 1 reply; 5+ messages in thread
From: chenglulu @ 2023-10-30 12:44 UTC (permalink / raw)
  To: Xi Ruoyao, gcc-patches; +Cc: i, xuchenghua


在 2023/10/30 下午8:26, Xi Ruoyao 写道:
> On Mon, 2023-10-30 at 19:50 +0800, chenglulu wrote:
>> 在 2023/10/30 下午7:42, Xi Ruoyao 写道:
>>> Now loongarch.md uses HAVE_AS_TLS, we need this to fix the failure
>>> building a cross compiler if the cross assembler is not installed yet.
>>>
>>> gcc/ChangeLog:
>>>
>>>   	* config/loongarch/loongarch-opts.h (HAVE_AS_TLS): Define to 0
>>>   	if not defined yet.
>>> ---
>>>
>>> Ok for trunk?
>> I have no problem with this submission, but I don't understand the
>> circumstances surrounding the error.
> When the developers hack GCC they sometimes build a cross compiler with
> no cross assembler, then HAVE_AS_TLS will just be undefined.  And in the
> future we may have an assmebler w/o TLS support (for example a tiny
> assembler for bare-metal target), then HAVE_AS_TLS will be undefined
> too.

Ok!

Thanks!

>
> The error message is:
>
> g++ -c   -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include  -I../../gcc/gcc/../libcpp/include  \
> 	-o build/gencondmd.o build/gencondmd.cc
> ../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
>   3655 |   "HAVE_AS_TLS"
>        |  ^~~~~~~~~~~
> ../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
>   3655 |   "HAVE_AS_TLS"
>        |  ^~~~~~~~~~~
> ../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
>   3655 |   "HAVE_AS_TLS"
>        |  ^~~~~~~~~~~
> ../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
>   3655 |   "HAVE_AS_TLS"
>        |  ^~~~~~~~~~~
> make[1]: *** [Makefile:2962: build/gencondmd.o] Error 1
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Pushed: [PATCH v2] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined [PR112299]
  2023-10-30 12:44     ` chenglulu
@ 2023-10-31  6:48       ` Xi Ruoyao
  0 siblings, 0 replies; 5+ messages in thread
From: Xi Ruoyao @ 2023-10-31  6:48 UTC (permalink / raw)
  To: chenglulu, gcc-patches; +Cc: i, xuchenghua

Pushed r14-5030.  The subject and ChangeLog are updated to include the
PR number.  The code change is same as v1.

On Mon, 2023-10-30 at 20:44 +0800, chenglulu wrote:
> 
> 在 2023/10/30 下午8:26, Xi Ruoyao 写道:
> > On Mon, 2023-10-30 at 19:50 +0800, chenglulu wrote:
> > > 在 2023/10/30 下午7:42, Xi Ruoyao 写道:
> > > > Now loongarch.md uses HAVE_AS_TLS, we need this to fix the failure
> > > > building a cross compiler if the cross assembler is not installed yet.
> > > > 
> > > > gcc/ChangeLog:
> > > > 
> > > >   	* config/loongarch/loongarch-opts.h (HAVE_AS_TLS): Define to 0
> > > >   	if not defined yet.
> > > > ---
> > > > 
> > > > Ok for trunk?
> > > I have no problem with this submission, but I don't understand the
> > > circumstances surrounding the error.
> > When the developers hack GCC they sometimes build a cross compiler with
> > no cross assembler, then HAVE_AS_TLS will just be undefined.  And in the
> > future we may have an assmebler w/o TLS support (for example a tiny
> > assembler for bare-metal target), then HAVE_AS_TLS will be undefined
> > too.
> 
> Ok!
> 
> Thanks!
> 
> > 
> > The error message is:
> > 
> > g++ -c   -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -I. -Ibuild -I../../gcc/gcc -I../../gcc/gcc/build -I../../gcc/gcc/../include  -I../../gcc/gcc/../libcpp/include  \
> > 	-o build/gencondmd.o build/gencondmd.cc
> > ../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
> >   3655 |   "HAVE_AS_TLS"
> >        |  ^~~~~~~~~~~
> > ../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
> >   3655 |   "HAVE_AS_TLS"
> >        |  ^~~~~~~~~~~
> > ../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
> >   3655 |   "HAVE_AS_TLS"
> >        |  ^~~~~~~~~~~
> > ../../gcc/gcc/config/loongarch/loongarch.md:3655:2: error: 'HAVE_AS_TLS' was not declared in this scope
> >   3655 |   "HAVE_AS_TLS"
> >        |  ^~~~~~~~~~~
> > make[1]: *** [Makefile:2962: build/gencondmd.o] Error 1
> > 
> 

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-31  6:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-30 11:42 [PATCH] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined Xi Ruoyao
2023-10-30 11:50 ` chenglulu
2023-10-30 12:26   ` Xi Ruoyao
2023-10-30 12:44     ` chenglulu
2023-10-31  6:48       ` Pushed: [PATCH v2] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined [PR112299] Xi Ruoyao

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).