public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
@ 2021-07-28  2:56 unlvsur at live dot com
  2021-07-28  3:00 ` [Bug libgcc/101655] " unlvsur at live dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  2:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

            Bug ID: 101655
           Summary: canadian compile of libgcc uses native cc as the
                    compiler instead of the target cross compiler
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

Created attachment 51216
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51216&action=edit
stderr messages

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
@ 2021-07-28  3:00 ` unlvsur at live dot com
  2021-07-28  3:06 ` unlvsur at live dot com
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  3:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
Created attachment 51217
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51217&action=edit
config.log

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
  2021-07-28  3:00 ` [Bug libgcc/101655] " unlvsur at live dot com
@ 2021-07-28  3:06 ` unlvsur at live dot com
  2021-07-28  3:11 ` unlvsur at live dot com
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  3:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #2 from cqwrteur <unlvsur at live dot com> ---
looks like canadian compile is not tested frequently as native or cross is
doing. It still breaks for either libgcc and libstdc++. (Some times even the
gcc itself, like msdos for example)

I am just helping another person who has no account to report the bug here.

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
  2021-07-28  3:00 ` [Bug libgcc/101655] " unlvsur at live dot com
  2021-07-28  3:06 ` unlvsur at live dot com
@ 2021-07-28  3:11 ` unlvsur at live dot com
  2021-07-28  3:16 ` unlvsur at live dot com
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  3:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
Created attachment 51218
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51218&action=edit
another libgcc bug

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2021-07-28  3:11 ` unlvsur at live dot com
@ 2021-07-28  3:16 ` unlvsur at live dot com
  2021-07-28  3:22 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  3:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #4 from cqwrteur <unlvsur at live dot com> ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100427
Also an old bug i reported 2 months ago for multilibs. However, nobody seems to
read that.

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (3 preceding siblings ...)
  2021-07-28  3:16 ` unlvsur at live dot com
@ 2021-07-28  3:22 ` pinskia at gcc dot gnu.org
  2021-07-28  3:29 ` unlvsur at live dot com
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-28  3:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you provide the exact steps you are doing?
Because I think you are misunderstanding how this works.

So if you use --host=x86_64-w64-mingw32 .

configure:2358: checking build system type
configure:2372: result: x86_64-pc-linux-gnu
configure:2419: checking host system type
configure:2432: result: x86_64-w64-mingw32
configure:2452: checking target system type
configure:2465: result: x86_64-w64-mingw32

But it uses the wrong compiler for the target libraries.

Also I see you had built the cross compiler in the src directory:
Configured with: ./configure --disable-libstdcxx-verbose --disable-multilib
--disable-nls --enable-fully-dynamic-string --enable-languages=c,c++,lto
--enable-large-address-aware --enable-mingw-wildcard --enable-threads=mcf
--target=x86_64-w64-mingw32

Don't do that.

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (4 preceding siblings ...)
  2021-07-28  3:22 ` pinskia at gcc dot gnu.org
@ 2021-07-28  3:29 ` unlvsur at live dot com
  2021-07-28  3:31 ` unlvsur at live dot com
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  3:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #6 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #5)
> Can you provide the exact steps you are doing?
> Because I think you are misunderstanding how this works.
> 
> So if you use --host=x86_64-w64-mingw32 .
> 
> configure:2358: checking build system type
> configure:2372: result: x86_64-pc-linux-gnu
> configure:2419: checking host system type
> configure:2432: result: x86_64-w64-mingw32
> configure:2452: checking target system type
> configure:2465: result: x86_64-w64-mingw32
> 
> But it uses the wrong compiler for the target libraries.
> 
> Also I see you had built the cross compiler in the src directory:
> Configured with: ./configure --disable-libstdcxx-verbose --disable-multilib
> --disable-nls --enable-fully-dynamic-string --enable-languages=c,c++,lto
> --enable-large-address-aware --enable-mingw-wildcard --enable-threads=mcf
> --target=x86_64-w64-mingw32
> 
> Don't do that.

I do not know actually, because i just reported that for my friend he does not
have an account. Can you just create an account for bootmgr@163.com?

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (5 preceding siblings ...)
  2021-07-28  3:29 ` unlvsur at live dot com
@ 2021-07-28  3:31 ` unlvsur at live dot com
  2021-07-28  3:37 ` unlvsur at live dot com
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  3:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #7 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #5)
> Can you provide the exact steps you are doing?
> Because I think you are misunderstanding how this works.
> 
> So if you use --host=x86_64-w64-mingw32 .
> 
> configure:2358: checking build system type
> configure:2372: result: x86_64-pc-linux-gnu
> configure:2419: checking host system type
> configure:2432: result: x86_64-w64-mingw32
> configure:2452: checking target system type
> configure:2465: result: x86_64-w64-mingw32
> 
> But it uses the wrong compiler for the target libraries.
> 
> Also I see you had built the cross compiler in the src directory:
> Configured with: ./configure --disable-libstdcxx-verbose --disable-multilib
> --disable-nls --enable-fully-dynamic-string --enable-languages=c,c++,lto
> --enable-large-address-aware --enable-mingw-wildcard --enable-threads=mcf
> --target=x86_64-w64-mingw32
> 
> Don't do that.

A question about Canadian compiler. Does the Canadian compiler try to find the
lib in the $prefix/$target/lib and include from prefix/$target/include? Does it
only find libs in the cross compiler itself? Should I build libc for candian
compiler or just copy files from cross compiler?

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (6 preceding siblings ...)
  2021-07-28  3:31 ` unlvsur at live dot com
@ 2021-07-28  3:37 ` unlvsur at live dot com
  2021-07-28  3:46 ` unlvsur at live dot com
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  3:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #8 from cqwrteur <unlvsur at live dot com> ---
He said he just adds patch for the mcf thread model.

https://github.com/lhmouse/MINGW-packages-dev/blob/master/mingw-w64-gcc-git/9000-gcc-10-branch-Added-mcf-thread-model-support-from-mcfgthread.patch

And he changed things in the makefile to enable -fno-ident -O3 -march=native.

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (7 preceding siblings ...)
  2021-07-28  3:37 ` unlvsur at live dot com
@ 2021-07-28  3:46 ` unlvsur at live dot com
  2021-07-28  7:35 ` schwab@linux-m68k.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-07-28  3:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #9 from cqwrteur <unlvsur at live dot com> ---
export CFLAGS="-O3 -DNDEBUG -march=native -fno-ident -ffunction-sections
-fdata-sections"
export CXXFLAGS=$CFLAGS CPPFLAGS=$CFLAGS
export LDFLAGS="-Wl,--gc-sections"

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (8 preceding siblings ...)
  2021-07-28  3:46 ` unlvsur at live dot com
@ 2021-07-28  7:35 ` schwab@linux-m68k.org
  2021-07-30  4:30 ` bootmgr at 163 dot com
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: schwab@linux-m68k.org @ 2021-07-28  7:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #10 from Andreas Schwab <schwab@linux-m68k.org> ---
In a canadian cross, you don't compile the target libraries.  They are already
built while building the cross compiler.

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (9 preceding siblings ...)
  2021-07-28  7:35 ` schwab@linux-m68k.org
@ 2021-07-30  4:30 ` bootmgr at 163 dot com
  2021-08-16  7:35 ` schwab@linux-m68k.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: bootmgr at 163 dot com @ 2021-07-30  4:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #11 from bootmgr at 163 dot com <bootmgr at 163 dot com> ---
(In reply to Andreas Schwab from comment #10)
> In a canadian cross, you don't compile the target libraries.  They are
> already built while building the cross compiler.

Isn't this a bug?
I manually reconfigured libgcc, and it can detect x86_46-w64-mingw32-{gcc,g++}.
But I did not continue to build it.
Why can't the target library be used for Canadian cross?
I have another question. Why can't libgcc,libquadmath,libvtv and libstdc++
detect the CFLAGS,CXXFLAGS or CPPFALGS environment variable when I build cross
compiler?

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (10 preceding siblings ...)
  2021-07-30  4:30 ` bootmgr at 163 dot com
@ 2021-08-16  7:35 ` schwab@linux-m68k.org
  2021-09-10 10:31 ` unlvsur at live dot com
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: schwab@linux-m68k.org @ 2021-08-16  7:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #12 from Andreas Schwab <schwab@linux-m68k.org> ---
For the target libraries, build and host are always taken from host and target,
resp., of the toplevel configuration.  Thus the build and host are set to
x86_64-w64-mingw32 here, and the build needs to be performed as such.

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (11 preceding siblings ...)
  2021-08-16  7:35 ` schwab@linux-m68k.org
@ 2021-09-10 10:31 ` unlvsur at live dot com
  2021-09-10 10:31 ` unlvsur at live dot com
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-09-10 10:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #13 from cqwrteur <unlvsur at live dot com> ---
Created attachment 51432
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51432&action=edit
i see the bug again

here are the logs

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (12 preceding siblings ...)
  2021-09-10 10:31 ` unlvsur at live dot com
@ 2021-09-10 10:31 ` unlvsur at live dot com
  2021-09-10 10:33 ` unlvsur at live dot com
  2022-03-10 18:31 ` unlvsur at live dot com
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-09-10 10:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

--- Comment #14 from cqwrteur <unlvsur at live dot com> ---
Created attachment 51433
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51433&action=edit
config file

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (13 preceding siblings ...)
  2021-09-10 10:31 ` unlvsur at live dot com
@ 2021-09-10 10:33 ` unlvsur at live dot com
  2022-03-10 18:31 ` unlvsur at live dot com
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2021-09-10 10:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |---
             Status|RESOLVED                    |UNCONFIRMED

--- Comment #15 from cqwrteur <unlvsur at live dot com> ---
Is that if --build == --target, even --target is not true host name, it still
uses cc??

cc should never ever happen tbh.

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

* [Bug libgcc/101655] canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler
  2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
                   ` (14 preceding siblings ...)
  2021-09-10 10:33 ` unlvsur at live dot com
@ 2022-03-10 18:31 ` unlvsur at live dot com
  15 siblings, 0 replies; 17+ messages in thread
From: unlvsur at live dot com @ 2022-03-10 18:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101655

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #16 from cqwrteur <unlvsur at live dot com> ---
Close it since it is too old

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

end of thread, other threads:[~2022-03-10 18:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28  2:56 [Bug libgcc/101655] New: canadian compile of libgcc uses native cc as the compiler instead of the target cross compiler unlvsur at live dot com
2021-07-28  3:00 ` [Bug libgcc/101655] " unlvsur at live dot com
2021-07-28  3:06 ` unlvsur at live dot com
2021-07-28  3:11 ` unlvsur at live dot com
2021-07-28  3:16 ` unlvsur at live dot com
2021-07-28  3:22 ` pinskia at gcc dot gnu.org
2021-07-28  3:29 ` unlvsur at live dot com
2021-07-28  3:31 ` unlvsur at live dot com
2021-07-28  3:37 ` unlvsur at live dot com
2021-07-28  3:46 ` unlvsur at live dot com
2021-07-28  7:35 ` schwab@linux-m68k.org
2021-07-30  4:30 ` bootmgr at 163 dot com
2021-08-16  7:35 ` schwab@linux-m68k.org
2021-09-10 10:31 ` unlvsur at live dot com
2021-09-10 10:31 ` unlvsur at live dot com
2021-09-10 10:33 ` unlvsur at live dot com
2022-03-10 18:31 ` unlvsur at live dot com

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