public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos
@ 2022-01-16 23:27 unlvsur at live dot com
2022-01-16 23:37 ` [Bug bootstrap/104057] " pinskia at gcc dot gnu.org
` (20 more replies)
0 siblings, 21 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-16 23:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
Bug ID: 104057
Summary: cross compiler multilibs libs path too chaos
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: unlvsur at live dot com
Target Milestone: ---
When build a cross compiler for gcc with multilib support, it does not
correctly find libs in the lib, lib32, libx32, lib64 etc, rather, it finds libs
in the lib/64 lib/x32 and lib which is ridiculous. lib32, libx32, lib64 are
completely ignored by the GCC build scripts.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
@ 2022-01-16 23:37 ` pinskia at gcc dot gnu.org
2022-01-17 1:02 ` unlvsur at live dot com
` (19 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-16 23:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-01-16
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you give an example?
There are two different directories where multilib is there.
One is based on the multilib name and the other is the OS multi-lib directory
name.
the one that matters to GCC depends on the context of the directory.
For an example ${prefix}/lib and ${prefix}/lib64 are OS directory names.
While things under ${prefix}/lib/gcc/${triplet}/${version}/ are the multi-lib
path.
Are you using --with-sysroot to use the normal OS directory structure?
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
2022-01-16 23:37 ` [Bug bootstrap/104057] " pinskia at gcc dot gnu.org
@ 2022-01-17 1:02 ` unlvsur at live dot com
2022-01-17 1:03 ` unlvsur at live dot com
` (18 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #2 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #1)
> Can you give an example?
> There are two different directories where multilib is there.
> One is based on the multilib name and the other is the OS multi-lib
> directory name.
>
> the one that matters to GCC depends on the context of the directory.
> For an example ${prefix}/lib and ${prefix}/lib64 are OS directory names.
> While things under ${prefix}/lib/gcc/${triplet}/${version}/ are the
> multi-lib path.
>
> Are you using --with-sysroot to use the normal OS directory structure?
Example 1: target=x86_64-ubuntu-linux-gnu
Let's assume prefix is $HOME/cross/x86_64-ubuntu-linux-gnu
When build GCC, GCC would find libs in
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib for all targets
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib/64 for 64 bit
target
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib/x32 for x32
target.
However, after building gcc, GCC would find libs in
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib for all targets
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib64 for 64 bit
targets
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/libx32 for x32 bit
targets
Example 2: target=x86_64-w64-mingw32
Let's assume prefix is $HOME/cross/x86_64-w64-mingw32
When build GCC, GCC would find libs in
$HOME/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/lib for all targets
$HOME/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/32 for 32 bit target
However, after building gcc, GCC would find libs in
$HOME/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/lib for all targets
$HOME/cross/x86_64-w64-mingw32/x86_64-w64-mingw32/lib32 for 32 bit targets
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
2022-01-16 23:37 ` [Bug bootstrap/104057] " pinskia at gcc dot gnu.org
2022-01-17 1:02 ` unlvsur at live dot com
@ 2022-01-17 1:03 ` unlvsur at live dot com
2022-01-17 1:14 ` pinskia at gcc dot gnu.org
` (17 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #1)
> Can you give an example?
> There are two different directories where multilib is there.
> One is based on the multilib name and the other is the OS multi-lib
> directory name.
>
> the one that matters to GCC depends on the context of the directory.
> For an example ${prefix}/lib and ${prefix}/lib64 are OS directory names.
> While things under ${prefix}/lib/gcc/${triplet}/${version}/ are the
> multi-lib path.
>
> Are you using --with-sysroot to use the normal OS directory structure?
Correct behavior should be the same.
When build GCC, GCC would find libs in
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib for all targets
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib64 for 64 bit
targets
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/libx32 for x32 bit
targets
However, after building gcc, GCC would find libs in
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib for all targets
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/lib64 for 64 bit
targets
$HOME/cross/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/libx32 for x32 bit
targets
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (2 preceding siblings ...)
2022-01-17 1:03 ` unlvsur at live dot com
@ 2022-01-17 1:14 ` pinskia at gcc dot gnu.org
2022-01-17 1:15 ` unlvsur at live dot com
` (16 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-17 1:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There is also multi-arch too.
I build cross compilers all the time and they find libraries under the sysroot
:
/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../libexec/gcc/aarch64-marvell-linux-gnu/10.1.0/collect2
-plugin
/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../libexec/gcc/aarch64-marvell-linux-gnu/10.1.0/liblto_plugin.so
-plugin-opt=/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../libexec/gcc/aarch64-marvell-linux-gnu/10.1.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccp36LLm.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
--sysroot=/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root
--eh-frame-hdr -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux
/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib/../lib64/crt1.o
/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib/../lib64/crti.o
/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/crtbegin.o
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib/../lib64
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/lib/../lib64
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib/../lib64
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/lib
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib
/tmp/ccDOS00V.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc
--push-state --as-needed -lgcc_s --pop-state
/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/crtend.o
/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib/../lib64/crtn.o
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib/../lib64
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/lib/../lib64
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib/../lib64
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/lib
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib
I configured with:
Configured with: /bajas/pinskia/src/toolchain-10/scripts/../src/configure
--disable-fixed-point --without-ppl --without-python --disable-werror
--enable-plugins
--with-lto-plugin-source=/bajas/pinskia/src/toolchain-10/scripts/../gits/gcc/lto-plugin
--with-system-zlib --with-system-zstd --enable-initfini-array
--disable-source-highlight --with-sysroot
--with-local-prefix=/bajas/pinskia/src/toolchain-10/scripts/../marvell-tools/aarch64-marvell-linux-gnu/sys-root
--disable-sim --enable-symvers=gnu --enable-__cxa_atexit --enable-symvers=gnu
--enable-__cxa_atexit --disable-sim --with-multilib-list=lp64,ilp32
--enable-gnu-indirect-function --target=aarch64-marvell-linux-gnu
--enable-languages=c,c++,fortran,go
--prefix=/bajas/pinskia/src/toolchain-10/scripts/../marvell-tools
--with-pkgversion='Marvell Inc. Version: Marvell GCC10 build 1026.0-3b'
--with-bugurl=http://www.marvell.com/support/
--with-libexpat-prefix=/bajas/pinskia/src/toolchain-10/scripts/../libs
I don't see a problem with the search for libs really. It searchs the correct
directories. I even tried with -mabi=ilp32 and I get:
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/ilp32
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib/../libilp32
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/lib/../libilp32
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib/../libilp32
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/lib
-L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-linux-gnu/sys-root/usr/lib
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (3 preceding siblings ...)
2022-01-17 1:14 ` pinskia at gcc dot gnu.org
@ 2022-01-17 1:15 ` unlvsur at live dot com
2022-01-17 1:18 ` pinskia at gcc dot gnu.org
` (15 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #4)
> There is also multi-arch too.
> I build cross compilers all the time and they find libraries under the
> sysroot :
> /bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../libexec/gcc/aarch64-
> marvell-linux-gnu/10.1.0/collect2 -plugin
> /bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../libexec/gcc/aarch64-
> marvell-linux-gnu/10.1.0/liblto_plugin.so
> -plugin-opt=/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../libexec/
> gcc/aarch64-marvell-linux-gnu/10.1.0/lto-wrapper
> -plugin-opt=-fresolution=/tmp/ccp36LLm.res -plugin-opt=-pass-through=-lgcc
> -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
> -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
> --sysroot=/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-
> marvell-linux-gnu/sys-root --eh-frame-hdr -dynamic-linker
> /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux
> /bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib/../lib64/crt1.o
> /bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib/../lib64/crti.o
> /bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/crtbegin.o
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib/../lib64
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/lib/../lib64
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib/../lib64
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/lib
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib /tmp/ccDOS00V.o -lgcc --push-state --as-needed
> -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state
> /bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/crtend.o
> /bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib/../lib64/crtn.o
>
>
>
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib/../lib64
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/lib/../lib64
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib/../lib64
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/lib
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib
>
> I configured with:
> Configured with: /bajas/pinskia/src/toolchain-10/scripts/../src/configure
> --disable-fixed-point --without-ppl --without-python --disable-werror
> --enable-plugins
> --with-lto-plugin-source=/bajas/pinskia/src/toolchain-10/scripts/../gits/gcc/
> lto-plugin --with-system-zlib --with-system-zstd --enable-initfini-array
> --disable-source-highlight --with-sysroot
> --with-local-prefix=/bajas/pinskia/src/toolchain-10/scripts/../marvell-tools/
> aarch64-marvell-linux-gnu/sys-root --disable-sim --enable-symvers=gnu
> --enable-__cxa_atexit --enable-symvers=gnu --enable-__cxa_atexit
> --disable-sim --with-multilib-list=lp64,ilp32 --enable-gnu-indirect-function
> --target=aarch64-marvell-linux-gnu --enable-languages=c,c++,fortran,go
> --prefix=/bajas/pinskia/src/toolchain-10/scripts/../marvell-tools
> --with-pkgversion='Marvell Inc. Version: Marvell GCC10 build 1026.0-3b'
> --with-bugurl=http://www.marvell.com/support/
> --with-libexpat-prefix=/bajas/pinskia/src/toolchain-10/scripts/../libs
>
>
> I don't see a problem with the search for libs really. It searchs the
> correct directories. I even tried with -mabi=ilp32 and I get:
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/ilp32
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib/../
> libilp32
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/lib/../libilp32
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib/../libilp32
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../lib/gcc/aarch64-
> marvell-linux-gnu/10.1.0/../../../../aarch64-marvell-linux-gnu/lib
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/lib
> -L/bajas/pinskia/src/toolchain-10/3b/marvell-tools/bin/../aarch64-marvell-
> linux-gnu/sys-root/usr/lib
There is a lot of reasons why sysroot should not be set. Like Canadian
compilation.
The default behavior can be fixed tbh.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (4 preceding siblings ...)
2022-01-17 1:15 ` unlvsur at live dot com
@ 2022-01-17 1:18 ` pinskia at gcc dot gnu.org
2022-01-17 1:19 ` unlvsur at live dot com
` (14 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-17 1:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to cqwrteur from comment #5)
> There is a lot of reasons why sysroot should not be set. Like Canadian
> compilation.
Huh? I do Canadian crosses with sysroot too.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (5 preceding siblings ...)
2022-01-17 1:18 ` pinskia at gcc dot gnu.org
@ 2022-01-17 1:19 ` unlvsur at live dot com
2022-01-17 1:20 ` unlvsur at live dot com
` (13 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #7 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #6)
> (In reply to cqwrteur from comment #5)
> > There is a lot of reasons why sysroot should not be set. Like Canadian
> > compilation.
>
> Huh? I do Canadian crosses with sysroot too.
I do not want to set sysroot, please. Some people even told me sysroot would
find weird path for x86_64-w64-mingw32 host
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (6 preceding siblings ...)
2022-01-17 1:19 ` unlvsur at live dot com
@ 2022-01-17 1:20 ` unlvsur at live dot com
2022-01-17 1:20 ` pinskia at gcc dot gnu.org
` (12 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #8 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #6)
> (In reply to cqwrteur from comment #5)
> > There is a lot of reasons why sysroot should not be set. Like Canadian
> > compilation.
>
> Huh? I do Canadian crosses with sysroot too.
Just fix the build scripts to make it find the right path, is it very hard?
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (7 preceding siblings ...)
2022-01-17 1:20 ` unlvsur at live dot com
@ 2022-01-17 1:20 ` pinskia at gcc dot gnu.org
2022-01-17 1:22 ` pinskia at gcc dot gnu.org
` (11 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-17 1:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There is --with-build-sysroot option explicitly for that case.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (8 preceding siblings ...)
2022-01-17 1:20 ` pinskia at gcc dot gnu.org
@ 2022-01-17 1:22 ` pinskia at gcc dot gnu.org
2022-01-17 1:24 ` unlvsur at live dot com
` (10 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-17 1:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Please provide the full steps how you build the cross compilers?
Please provide the exact command where the problem shows up after building the
compiler?
Without that we cannot fix anything.
If you don't want to provide that then you will need to fix the problem
yourself since we cannot read your mind of what is going wrong.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (9 preceding siblings ...)
2022-01-17 1:22 ` pinskia at gcc dot gnu.org
@ 2022-01-17 1:24 ` unlvsur at live dot com
2022-01-17 1:28 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #11 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #10)
> Please provide the full steps how you build the cross compilers?
> Please provide the exact command where the problem shows up after building
> the compiler?
>
>
> Without that we cannot fix anything.
> If you don't want to provide that then you will need to fix the problem
> yourself since we cannot read your mind of what is going wrong.
I have entire series of videos how to do Canadian compilation.
https://youtu.be/pfE35Xm_kB8
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (10 preceding siblings ...)
2022-01-17 1:24 ` unlvsur at live dot com
@ 2022-01-17 1:28 ` pinskia at gcc dot gnu.org
2022-01-17 1:34 ` unlvsur at live dot com
` (8 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-17 1:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't care about your youtube videos (they are not accessable due to not
having
the steps written down). I need the steps written here in the bug report.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (11 preceding siblings ...)
2022-01-17 1:28 ` pinskia at gcc dot gnu.org
@ 2022-01-17 1:34 ` unlvsur at live dot com
2022-01-17 1:35 ` unlvsur at live dot com
` (7 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #13 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #12)
> I don't care about your youtube videos (they are not accessable due to not
> having
> the steps written down). I need the steps written here in the bug report.
export TARGET=x86_64-ubuntu-linux-gnu
export PREFIX=$HOME/cross/$TARGET
export PATH=$PREFIX:$PATH
../../binutils-gdb/configure --disable-werror --disable-nls --target=$TARGET
--enable-gold --with-python3 --prefix=$PREFIX
../../gcc/configure --disable-nls --disable-werror --target=$TARGET
--prefix=$PREFIX --without-headers --with-newlib --disable-hosted-libstdcxx
--disable-shared --disable-threads --enable-languages=c,c++
Use this to build a x86_64-ubuntu-linux-gnu-gcc to build glibc
glibc 32,64,x32
copy glibc32/lib to $PREFIX/$TARGET/lib/32 and $PREFIX/$TARGET/lib32
copy glibc64/lib to $PREFIX/$TARGET/lib $PREFIX/$TARGET/lib64
copy glibcx32/lib to $PREFIX/$TARGET/lib/x32 $PREFIX/$TARGET/libx32
Then build gcc2.
../../gcc/configure --disable-nls --disable-werror --target=$TARGET
--prefix=$PREFIX --disable-libstdcxx-verbose --enable-languages=c,c++
then copy all files from lib32 to lib (since GCC cannot find 32bit libs in
lib32 for x86_64-linux-gnu)
Done
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (12 preceding siblings ...)
2022-01-17 1:34 ` unlvsur at live dot com
@ 2022-01-17 1:35 ` unlvsur at live dot com
2022-01-17 1:40 ` unlvsur at live dot com
` (6 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #14 from cqwrteur <unlvsur at live dot com> ---
export PATH=$PREFIX/bin:$PATH
sorry
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (13 preceding siblings ...)
2022-01-17 1:35 ` unlvsur at live dot com
@ 2022-01-17 1:40 ` unlvsur at live dot com
2022-01-17 1:40 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #15 from cqwrteur <unlvsur at live dot com> ---
(In reply to cqwrteur from comment #14)
> export PATH=$PREFIX/bin:$PATH
>
> sorry
x86_64-ubuntu-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=x86_64-ubuntu-linux-gnu-g++
COLLECT_LTO_WRAPPER=/home/cqwrteur/toolchains/gnu/native/x86_64-ubuntu-linux-gnu/libexec/gcc/x86_64-ubuntu-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-ubuntu-linux-gnu
Configured with: ../../../../gcc/configure --disable-nls --disable-werror
--target=x86_64-ubuntu-linux-gnu
--prefix=/home/cqwrteur/toolchains/gnu/native/x86_64-ubuntu-linux-gnu
--disable-libstdcxx-verbose --disable-bootstrap --enable-languages=c,c++
--with-multilib-list=m64,m32,mx32 --enable-multilib
--with-gxx-libcxx-include-dir=/home/cqwrteur/toolchains/gnu/native/x86_64-ubuntu-linux-gnu/x86_64-ubuntu-linux-gnu/include/c++/v1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20220116 (experimental) (GCC)
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (14 preceding siblings ...)
2022-01-17 1:40 ` unlvsur at live dot com
@ 2022-01-17 1:40 ` pinskia at gcc dot gnu.org
2022-01-17 1:41 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-17 1:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There are a definitely a few steps missing,
Where is the Linux headers installed?
How did you configure glibc and install it?
I don't see you copying the headers of glibc anywhere.
sysroots make it easier to place just the normal OS directory structure under
${prefix}/${target}/sys-root/ which is why it is the recommened way.
If sys-root is broken for mingw we should fix that instead.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (15 preceding siblings ...)
2022-01-17 1:40 ` pinskia at gcc dot gnu.org
@ 2022-01-17 1:41 ` pinskia at gcc dot gnu.org
2022-01-17 1:43 ` unlvsur at live dot com
` (3 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-17 1:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
also multilib directories under ${prefix} for a cross does not use OS
directories as most cross compilers have OS directories.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (16 preceding siblings ...)
2022-01-17 1:41 ` pinskia at gcc dot gnu.org
@ 2022-01-17 1:43 ` unlvsur at live dot com
2022-01-17 1:45 ` unlvsur at live dot com
` (2 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #18 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #17)
> also multilib directories under ${prefix} for a cross does not use OS
> directories as most cross compilers have OS directories.
Of course. I installed Linux kernel headers and glibc.
they are installed in $PREFIX/$TARGET
Since we need to build 32 glibc, x32 glibc, 64 glibc. I installed them into
separate dirs and copy files with each other. Or they will overwrite file.
Then copy all headers to $PREFIX/$TARGET/include
glibc32/lib to $PREFIX/lib32 $PREFIX/lib/32
glibc64/lib to $PREFIX/lib64 $PREFIX/lib
glibcx32/lib to $PREFIX/libx32 $PREFIX/lib/x32
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (17 preceding siblings ...)
2022-01-17 1:43 ` unlvsur at live dot com
@ 2022-01-17 1:45 ` unlvsur at live dot com
2022-01-17 1:45 ` unlvsur at live dot com
2022-01-17 1:46 ` unlvsur at live dot com
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #19 from cqwrteur <unlvsur at live dot com> ---
(In reply to cqwrteur from comment #18)
> (In reply to Andrew Pinski from comment #17)
> > also multilib directories under ${prefix} for a cross does not use OS
> > directories as most cross compilers have OS directories.
>
> Of course. I installed Linux kernel headers and glibc.
>
> they are installed in $PREFIX/$TARGET
>
> Since we need to build 32 glibc, x32 glibc, 64 glibc. I installed them into
> separate dirs and copy files with each other. Or they will overwrite file.
>
> Then copy all headers to $PREFIX/$TARGET/include
>
> glibc32/lib to $PREFIX/lib32 $PREFIX/lib/32
>
> glibc64/lib to $PREFIX/lib64 $PREFIX/lib
>
> glibcx32/lib to $PREFIX/libx32 $PREFIX/lib/x32
https://pete.akeo.ie/2010/07/compiling-mingw-w64-with-multilib-on.html
Here was a similar result other people built 10 years ago. I find this issue
happens for all targets, not just x86_64-w64-mingw32. The GCC just find
different directories at build stage and after build.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (18 preceding siblings ...)
2022-01-17 1:45 ` unlvsur at live dot com
@ 2022-01-17 1:45 ` unlvsur at live dot com
2022-01-17 1:46 ` unlvsur at live dot com
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #20 from cqwrteur <unlvsur at live dot com> ---
(In reply to cqwrteur from comment #18)
> (In reply to Andrew Pinski from comment #17)
> > also multilib directories under ${prefix} for a cross does not use OS
> > directories as most cross compilers have OS directories.
>
> Of course. I installed Linux kernel headers and glibc.
>
> they are installed in $PREFIX/$TARGET
>
> Since we need to build 32 glibc, x32 glibc, 64 glibc. I installed them into
> separate dirs and copy files with each other. Or they will overwrite file.
>
> Then copy all headers to $PREFIX/$TARGET/include
>
> glibc32/lib to $PREFIX/lib32 $PREFIX/lib/32
>
> glibc64/lib to $PREFIX/lib64 $PREFIX/lib
>
> glibcx32/lib to $PREFIX/libx32 $PREFIX/lib/x32
I use the first gcc to build them to build libgcc and libsupc++.
Build them to build glibc.
Then rebuild entire gcc with glibc.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug bootstrap/104057] cross compiler multilibs libs path too chaos
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
` (19 preceding siblings ...)
2022-01-17 1:45 ` unlvsur at live dot com
@ 2022-01-17 1:46 ` unlvsur at live dot com
20 siblings, 0 replies; 22+ messages in thread
From: unlvsur at live dot com @ 2022-01-17 1:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #21 from cqwrteur <unlvsur at live dot com> ---
(In reply to cqwrteur from comment #18)
> (In reply to Andrew Pinski from comment #17)
> > also multilib directories under ${prefix} for a cross does not use OS
> > directories as most cross compilers have OS directories.
>
> Of course. I installed Linux kernel headers and glibc.
>
> they are installed in $PREFIX/$TARGET
>
> Since we need to build 32 glibc, x32 glibc, 64 glibc. I installed them into
> separate dirs and copy files with each other. Or they will overwrite file.
>
> Then copy all headers to $PREFIX/$TARGET/include
>
> glibc32/lib to $PREFIX/lib32 $PREFIX/lib/32
>
> glibc64/lib to $PREFIX/lib64 $PREFIX/lib
>
> glibcx32/lib to $PREFIX/libx32 $PREFIX/lib/x32
glibc32/lib to $PREFIX/$TARGET/lib32 $PREFIX/$TARGET/lib/32
glibc64/lib to $PREFIX/$TARGET/lib64 $PREFIX/$TARGET/lib
glibcx32/lib to $PREFIX/$TARGET/libx32 $PREFIX/$TARGET/lib/x32
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2022-01-17 1:46 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 23:27 [Bug bootstrap/104057] New: cross compiler multilibs libs path too chaos unlvsur at live dot com
2022-01-16 23:37 ` [Bug bootstrap/104057] " pinskia at gcc dot gnu.org
2022-01-17 1:02 ` unlvsur at live dot com
2022-01-17 1:03 ` unlvsur at live dot com
2022-01-17 1:14 ` pinskia at gcc dot gnu.org
2022-01-17 1:15 ` unlvsur at live dot com
2022-01-17 1:18 ` pinskia at gcc dot gnu.org
2022-01-17 1:19 ` unlvsur at live dot com
2022-01-17 1:20 ` unlvsur at live dot com
2022-01-17 1:20 ` pinskia at gcc dot gnu.org
2022-01-17 1:22 ` pinskia at gcc dot gnu.org
2022-01-17 1:24 ` unlvsur at live dot com
2022-01-17 1:28 ` pinskia at gcc dot gnu.org
2022-01-17 1:34 ` unlvsur at live dot com
2022-01-17 1:35 ` unlvsur at live dot com
2022-01-17 1:40 ` unlvsur at live dot com
2022-01-17 1:40 ` pinskia at gcc dot gnu.org
2022-01-17 1:41 ` pinskia at gcc dot gnu.org
2022-01-17 1:43 ` unlvsur at live dot com
2022-01-17 1:45 ` unlvsur at live dot com
2022-01-17 1:45 ` unlvsur at live dot com
2022-01-17 1:46 ` 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).