public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113648] New: Cross compiler cannot find cross binutils on macOS
@ 2024-01-29  5:38 galaxyking0419 at gmail dot com
  2024-01-29  5:53 ` [Bug target/113648] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: galaxyking0419 at gmail dot com @ 2024-01-29  5:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113648
           Summary: Cross compiler cannot find cross binutils on macOS
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: galaxyking0419 at gmail dot com
  Target Milestone: ---

According to https://gcc.gnu.org/install/configure.html, the gcc should find
binutils components (e.g., as, ld, objdump) using rule:
- Unless GCC is being built with a cross compiler, check the
libexec/gcc/target/version directory. libexec defaults to exec-prefix/libexec;
exec-prefix defaults to prefix, which defaults to /usr/local unless overridden
by the --prefix=pathname switch described above. target is the target system
triple, such as ‘sparc-sun-solaris2.11’, and version denotes the GCC version,
such as 3.0. If the target system is the same that you are building on, check
operating system specific directories.
- Check in the PATH for a tool whose name is prefixed by the target system
triple.
- Check in the PATH for a tool whose name is not prefixed by the target system
triple, if the host and target system triple are the same (in other words, we
use a host tool if it can be used for the target as well).

My setup following the target system triple convention:
[u@mbp d]% whereis aarch64-linux-gnu-ld
aarch64-linux-gnu-ld: /Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-ld

But the aarch64-linux-gnu-gcc still picks the macOS as, ld etc:
[u@mbp d]% aarch64-linux-gnu-gcc -print-prog-name=ld
ld
[u@mbp d]% aarch64-linux-gnu-gcc -print-prog-name=as
as
[u@mbp d]% aarch64-linux-gnu-gcc -print-prog-name=objdump
objdump

GCC configuration:
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../gcc-13.2.0/configure --disable-libgomp
--disable-libquadmath --disable-libsanitizer --disable-libssp
--disable-libstdcxx-pch --disable-libunwind-exceptions --disable-multilib
--disable-nls --disable-werror --enable-__cxa_atexit --enable-checking=release
--enable-clocale=gnu --enable-default-pie --enable-gnu-indirect-function
--enable-gnu-unique-object --enable-install-libiberty --enable-languages=c,c++
--enable-lto --enable-shared --enable-threads=posix
--libexecdir=/Volumes/Toolchain/openwrt/lib --prefix=/Volumes/Toolchain/openwrt
--program-prefix=aarch64-linux-gnu- --target=aarch64-linux-gnu
--with-build-sysroot=/Volumes/Toolchain/openwrt/aarch64-linux-gnu
--with-cpu=cortex-a53+crypto --with-glibc-version=2.38 --with-gmp=/opt/homebrew
--with-mpc=/opt/homebrew --with-mpfr=/opt/homebrew
--with-local-prefix=/Volumes/Toolchain/openwrt/aarch64-linux-gnu
--with-sysroot=/Volumes/Toolchain/openwrt/aarch64-linux-gnu --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC)

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

* [Bug target/113648] Cross compiler cannot find cross binutils on macOS
  2024-01-29  5:38 [Bug target/113648] New: Cross compiler cannot find cross binutils on macOS galaxyking0419 at gmail dot com
@ 2024-01-29  5:53 ` pinskia at gcc dot gnu.org
  2024-01-29  6:46 ` galaxyking0419 at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-29  5:53 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-01-29
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Works for me for a cross from Linux:
[apinski@xeond2 upstream-full-cross]$ ./install/bin/aarch64-linux-gnu-gcc
-print-prog-name=ld
/bajas/pinskia/src/upstream-full-cross/install/bin/../lib/gcc/aarch64-linux-gnu/14.0.1/../../../../aarch64-linux-gnu/bin/ld

My configure line:
Configured with: ../configure --target=aarch64-linux-gnu
--prefix=/home/apinski/src/upstream-full-cross/install
--enable-languages=c,c++,fortran,go
--with-sysroot=/home/apinski/src/upstream-full-cross/install//sysroot


Can you do:
provide the output of `strace aarch64-linux-gnu-gcc -print-prog-name=ld ` ?

Also provide the config.log from the original build?

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

* [Bug target/113648] Cross compiler cannot find cross binutils on macOS
  2024-01-29  5:38 [Bug target/113648] New: Cross compiler cannot find cross binutils on macOS galaxyking0419 at gmail dot com
  2024-01-29  5:53 ` [Bug target/113648] " pinskia at gcc dot gnu.org
@ 2024-01-29  6:46 ` galaxyking0419 at gmail dot com
  2024-01-29  8:47 ` schwab@linux-m68k.org
  2024-01-29  8:50 ` schwab@linux-m68k.org
  3 siblings, 0 replies; 5+ messages in thread
From: galaxyking0419 at gmail dot com @ 2024-01-29  6:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from William Tang <galaxyking0419 at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> Works for me for a cross from Linux:
> [apinski@xeond2 upstream-full-cross]$ ./install/bin/aarch64-linux-gnu-gcc
> -print-prog-name=ld
> /bajas/pinskia/src/upstream-full-cross/install/bin/../lib/gcc/aarch64-linux-
> gnu/14.0.1/../../../../aarch64-linux-gnu/bin/ld
> 
> My configure line:
> Configured with: ../configure --target=aarch64-linux-gnu
> --prefix=/home/apinski/src/upstream-full-cross/install
> --enable-languages=c,c++,fortran,go
> --with-sysroot=/home/apinski/src/upstream-full-cross/install//sysroot
> 
> 
> Can you do:
> provide the output of `strace aarch64-linux-gnu-gcc -print-prog-name=ld ` ?
> 
> Also provide the config.log from the original build?

[u@h d]% sudo dtruss aarch64-linux-gnu-gcc -print-prog-name=ld
SYSCALL(args)            = return
ld
munmap(0x1047A0000, 0x98000)             = 0 0
munmap(0x104838000, 0x8000)              = 0 0
munmap(0x104840000, 0x4000)              = 0 0
munmap(0x104844000, 0x4000)              = 0 0
munmap(0x104848000, 0x5C000)             = 0 0
crossarch_trap(0x0, 0x0, 0x0)            = -1 Err#45
fsgetpath(0x16B8F31C8, 0x400, 0x16B8F31A8)               = 53 0
fsgetpath(0x16B8F31D8, 0x400, 0x16B8F31B8)               = 14 0
csrctl(0x0, 0x16B8F35DC, 0x4)            = -1 Err#1
__mac_syscall(0x18AF5E948, 0x2, 0x16B8F3520)             = 0 0
csrctl(0x0, 0x16B8F35FC, 0x4)            = -1 Err#1
__mac_syscall(0x18AF5B79E, 0x5A, 0x16B8F3590)            = 0 0
sysctl([unknown, 3, 0, 0, 0, 0] (2), 0x16B8F2AF8, 0x16B8F2AF0, 0x18AF5D3EF,
0xD)         = 0 0
sysctl([CTL_KERN, 137, 0, 0, 0, 0] (2), 0x16B8F2BA8, 0x16B8F2BA0, 0x0, 0x0)    
         = 0 0
open("/\0", 0x20100000, 0x0)             = 3 0
openat(0x3, "System/Cryptexes/OS\0", 0x100000, 0x0)              = 4 0
dup(0x4, 0x0, 0x0)               = 5 0
fstatat64(0x4, 0x16B8F2681, 0x16B8F25F0)                 = 0 0
openat(0x4, "System/Library/dyld/\0", 0x100000, 0x0)             = 6 0
fcntl(0x6, 0x32, 0x16B8F2680)            = 0 0
dup(0x6, 0x0, 0x0)               = 7 0
dup(0x5, 0x0, 0x0)               = 8 0
close(0x3)               = 0 0
close(0x5)               = 0 0
close(0x4)               = 0 0
close(0x6)               = 0 0
shared_region_check_np(0x16B8F2C90, 0x0, 0x0)            = 0 0
fsgetpath(0x16B8F31E0, 0x400, 0x16B8F3138)               = 82 0
fcntl(0x8, 0x32, 0x16B8F31E0)            = 0 0
close(0x8)               = 0 0
close(0x7)               = 0 0
getfsstat64(0x0, 0x0, 0x2)               = 11 0
getfsstat64(0x104B72040, 0x5D28, 0x2)            = 11 0
getattrlist("/\0", 0x16B8F3110, 0x16B8F3080)             = 0 0
stat64("/System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e\0",
0x16B8F3470, 0x0)          = 0 0
dtrace: error on enabled probe ID 1690 (ID 845: syscall::stat64:return):
invalid address (0x0) in action #11 at DIF offset 12
stat64("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0", 0x16B8F2920,
0x0)       = 0 0
open("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0", 0x0, 0x0)       
         = 3 0
mmap(0x0, 0x259A38, 0x1, 0x40002, 0x3, 0x0)              = 0x104BB4000 0
fcntl(0x3, 0x32, 0x16B8F2A38)            = 0 0
close(0x3)               = 0 0
munmap(0x104BB4000, 0x259A38)            = 0 0
stat64("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0", 0x16B8F2E90,
0x0)       = 0 0
stat64("/usr/lib/libiconv.2.dylib\0", 0x16B8F1E20, 0x0)          = -1 Err#2
stat64("/System/Volumes/Preboot/Cryptexes/OS/usr/lib/libiconv.2.dylib\0",
0x16B8F1DD0, 0x0)              = -1 Err#2
stat64("/usr/lib/system/libdispatch.dylib\0", 0x16B8EFA30, 0x0)          = -1
Err#2
stat64("/System/Volumes/Preboot/Cryptexes/OS/usr/lib/system/libdispatch.dylib\0",
0x16B8EF9E0, 0x0)              = -1 Err#2
stat64("/usr/lib/system/libdispatch.dylib\0", 0x16B8EFA30, 0x0)          = -1
Err#2
stat64("/usr/lib/libc++.1.dylib\0", 0x16B8F1E20, 0x0)            = -1 Err#2
stat64("/System/Volumes/Preboot/Cryptexes/OS/usr/lib/libc++.1.dylib\0",
0x16B8F1DD0, 0x0)                = -1 Err#2
stat64("/usr/lib/libSystem.B.dylib\0", 0x16B8F1E20, 0x0)                 = -1
Err#2
stat64("/System/Volumes/Preboot/Cryptexes/OS/usr/lib/libSystem.B.dylib\0",
0x16B8F1DD0, 0x0)             = -1 Err#2
open("/dev/dtracehelper\0", 0x2, 0x0)            = 3 0
ioctl(0x3, 0x80086804, 0x16B8F19C8)              = 0 0
close(0x3)               = 0 0
open("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0", 0x0, 0x0)       
         = 3 0
__mac_syscall(0x18AF5E948, 0x2, 0x16B8F10D0)             = 0 0
map_with_linking_np(0x16B8EEC60, 0x1, 0x16B8EEC90)               = 0 0
close(0x3)               = 0 0
mprotect(0x1046B0000, 0x3C000, 0x1)              = 0 0
shared_region_check_np(0xFFFFFFFFFFFFFFFF, 0x0, 0x0)             = 0 0
mprotect(0x104B70000, 0x40000, 0x1)              = 0 0
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0)             = -1 Err#2
bsdthread_register(0x18B24CE34, 0x18B24CE28, 0x4000)             = 1073742303 0
getpid(0x0, 0x0, 0x0)            = 807 0
shm_open(0x18B0E6F51, 0x0, 0x4534320)            = 3 0
fstat64(0x3, 0x16B8F1EE0, 0x0)           = 0 0
mmap(0x0, 0x4000, 0x1, 0x40001, 0x3, 0x0)                = 0x104BBC000 0
close(0x3)               = 0 0
ioctl(0x2, 0x4004667A, 0x16B8F1F8C)              = 0 0
mprotect(0x104BC8000, 0x4000, 0x0)               = 0 0
mprotect(0x104BD4000, 0x4000, 0x0)               = 0 0
mprotect(0x104BD8000, 0x4000, 0x0)               = 0 0
mprotect(0x104BE4000, 0x4000, 0x0)               = 0 0
mprotect(0x104BE8000, 0x4000, 0x0)               = 0 0
mprotect(0x104BF4000, 0x4000, 0x0)               = 0 0
mprotect(0x104BC0000, 0x98, 0x1)                 = 0 0
mprotect(0x104BC0000, 0x98, 0x3)                 = 0 0
mprotect(0x104BC0000, 0x98, 0x1)                 = 0 0
mprotect(0x104BF8000, 0x4000, 0x1)               = 0 0
mprotect(0x104BFC000, 0x98, 0x1)                 = 0 0
mprotect(0x104BFC000, 0x98, 0x3)                 = 0 0
mprotect(0x104BFC000, 0x98, 0x1)                 = 0 0
mprotect(0x104BC0000, 0x98, 0x3)                 = 0 0
mprotect(0x104BC0000, 0x98, 0x1)                 = 0 0
mprotect(0x104BF8000, 0x4000, 0x3)               = 0 0
mprotect(0x104BF8000, 0x4000, 0x1)               = 0 0
mprotect(0x104B70000, 0x40000, 0x3)              = 0 0
mprotect(0x104B70000, 0x40000, 0x1)              = 0 0
objc_bp_assist_cfg_np(0x18AE85400, 0x80000018001C1048, 0x0)              = -1
Err#5
issetugid(0x0, 0x0, 0x0)                 = 0 0
mprotect(0x104B70000, 0x40000, 0x3)              = 0 0
getentropy(0x16B8F1698, 0x20, 0x0)               = 0 0
mprotect(0x104B70000, 0x40000, 0x1)              = 0 0
mprotect(0x104B70000, 0x40000, 0x3)              = 0 0
mprotect(0x104B70000, 0x40000, 0x1)              = 0 0
getattrlist("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0",
0x16B8F1E70, 0x16B8F1E88)          = 0 0
access("/Volumes/Toolchain/openwrt/bin\0", 0x4, 0x0)             = 0 0
open("/Volumes/Toolchain/openwrt/bin\0", 0x0, 0x0)               = 3 0
fstat64(0x3, 0x147E04540, 0x0)           = 0 0
csrctl(0x0, 0x16B8F209C, 0x4)            = 0 0
fcntl(0x3, 0x32, 0x16B8F1D58)            = 0 0
close(0x3)               = 0 0
open("/Volumes/Toolchain/openwrt/bin/Info.plist\0", 0x0, 0x0)            = -1
Err#2
proc_info(0x2, 0x327, 0xD)               = 64 0
csops_audittoken(0x327, 0x10, 0x16B8F20E0)               = 0 0
sysctl([unknown, 3, 0, 0, 0, 0] (2), 0x16B8F2438, 0x16B8F2430, 0x18E600D3D,
0x15)        = 0 0
sysctl([CTL_KERN, 135, 0, 0, 0, 0] (2), 0x16B8F24C8, 0x16B8F24C0, 0x0, 0x0)    
         = 0 0
csops(0x327, 0x0, 0x16B8F256C)           = 0 0
mprotect(0x104B70000, 0x40000, 0x3)              = 0 0
ioctl(0x2, 0x4004667A, 0x16B8F34EC)              = 0 0
ioctl(0x2, 0x4004667A, 0x16B8F34EC)              = 0 0
ioctl(0x2, 0x4004667A, 0x16B8F34BC)              = 0 0
sigaction(0x2, 0x16B8F3568, 0x16B8F3590)                 = 0 0
sigaction(0x2, 0x16B8F3568, 0x16B8F3590)                 = 0 0
sigaction(0x1, 0x16B8F3568, 0x16B8F3590)                 = 0 0
sigaction(0x1, 0x16B8F3568, 0x16B8F3590)                 = 0 0
sigaction(0xF, 0x16B8F3568, 0x16B8F3590)                 = 0 0
sigaction(0xF, 0x16B8F3568, 0x16B8F3590)                 = 0 0
sigaction(0xD, 0x16B8F3568, 0x16B8F3590)                 = 0 0
sigaction(0xD, 0x16B8F3568, 0x16B8F3590)                 = 0 0
sigaction(0x14, 0x16B8F3568, 0x16B8F3590)                = 0 0
getrlimit(0x1003, 0x16B8F3598, 0x0)              = 0 0
setrlimit(0x1003, 0x16B8F3598, 0x0)              = 0 0
access("/opt/homebrew/opt/gnu-sed/libexec/gnubin/aarch64-linux-gnu-gcc\0", 0x1,
0x0)     = -1 Err#2
access("/usr/local/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)               = -1
Err#2
access("/System/Cryptexes/App/usr/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)      
         = -1 Err#2
access("/usr/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)             = -1 Err#2
access("/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)                 = -1 Err#2
access("/usr/sbin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)            = -1 Err#2
access("/sbin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)                = -1 Err#2
access("/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin/aarch64-linux-gnu-gcc\0",
0x1, 0x0)            = -1 Err#2
access("/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin/aarch64-linux-gnu-gcc\0",
0x1, 0x0)          = -1 Err#2
access("/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin/aarch64-linux-gnu-gcc\0",
0x1, 0x0)            = -1 Err#2
access("/Users/william/Applications/aarch64-linux-gnu-gcc\0", 0x1, 0x0)        
 = -1 Err#2
access("/Users/william/Library/Python/3.9/bin/aarch64-linux-gnu-gcc\0", 0x1,
0x0)        = -1 Err#2
access("/sbin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)                = -1 Err#2
access("/opt/homebrew/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)            = -1
Err#2
access("/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/aarch64-linux-gnu-gcc\0",
0x1, 0x0)           = -1 Err#2
access("/Applications/CLion.app/Contents/bin/ninja/mac/aarch64/aarch64-linux-gnu-gcc\0",
0x1, 0x0)               = -1 Err#2
access("/Volumes/Toolchain/merlin/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)      
         = -1 Err#2
access("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)     
         = 0 0
stat64("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0", 0x16B8F2FB8,
0x0)       = 0 0
stat64("/\0", 0x16B8F0B10, 0x0)          = 0 0
getattrlist("/Volumes\0", 0x18B160E54, 0x16B8F2420)              = 0 0
getattrlist("/Volumes/Toolchain\0", 0x18B160E54, 0x16B8F2420)            = 0 0
statfs64(0x16B8F28E8, 0x16B8F0FA0, 0x0)          = 0 0
lstat64("/Volumes/Toolchain\0", 0x16B8F0B10, 0x0)                = 0 0
lstat64("/Volumes\0", 0x16B8F0B10, 0x0)          = 0 0
getattrlist("/Volumes/Toolchain/openwrt\0", 0x18B160E54, 0x16B8F2420)          
 = 0 0
getattrlist("/Volumes/Toolchain/openwrt/bin\0", 0x18B160E54, 0x16B8F2420)      
         = 0 0
getattrlist("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0",
0x18B160E54, 0x16B8F2420)          = 0 0
access("/opt/homebrew/opt/gnu-sed/libexec/gnubin/aarch64-linux-gnu-gcc\0", 0x1,
0x0)     = -1 Err#2
access("/usr/local/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)               = -1
Err#2
access("/System/Cryptexes/App/usr/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)      
         = -1 Err#2
access("/usr/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)             = -1 Err#2
access("/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)                 = -1 Err#2
access("/usr/sbin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)            = -1 Err#2
access("/sbin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)                = -1 Err#2
access("/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin/aarch64-linux-gnu-gcc\0",
0x1, 0x0)            = -1 Err#2
access("/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin/aarch64-linux-gnu-gcc\0",
0x1, 0x0)          = -1 Err#2
access("/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin/aarch64-linux-gnu-gcc\0",
0x1, 0x0)            = -1 Err#2
access("/Users/william/Applications/aarch64-linux-gnu-gcc\0", 0x1, 0x0)        
 = -1 Err#2
access("/Users/william/Library/Python/3.9/bin/aarch64-linux-gnu-gcc\0", 0x1,
0x0)        = -1 Err#2
access("/sbin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)                = -1 Err#2
access("/opt/homebrew/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)            = -1
Err#2
access("/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/aarch64-linux-gnu-gcc\0",
0x1, 0x0)           = -1 Err#2
access("/Applications/CLion.app/Contents/bin/ninja/mac/aarch64/aarch64-linux-gnu-gcc\0",
0x1, 0x0)               = -1 Err#2
access("/Volumes/Toolchain/merlin/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)      
         = -1 Err#2
access("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0", 0x1, 0x0)     
         = 0 0
stat64("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0", 0x16B8F2FB8,
0x0)       = 0 0
getattrlist("/Volumes\0", 0x18B160E54, 0x16B8F2420)              = 0 0
getattrlist("/Volumes/Toolchain\0", 0x18B160E54, 0x16B8F2420)            = 0 0
statfs64(0x16B8F28E8, 0x16B8F0FA0, 0x0)          = 0 0
lstat64("/Volumes/Toolchain\0", 0x16B8F0B10, 0x0)                = 0 0
lstat64("/Volumes\0", 0x16B8F0B10, 0x0)          = 0 0
getattrlist("/Volumes/Toolchain/openwrt\0", 0x18B160E54, 0x16B8F2420)          
 = 0 0
getattrlist("/Volumes/Toolchain/openwrt/bin\0", 0x18B160E54, 0x16B8F2420)      
         = 0 0
getattrlist("/Volumes/Toolchain/openwrt/bin/aarch64-linux-gnu-gcc\0",
0x18B160E54, 0x16B8F2420)          = 0 0
access("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/\0", 0x1,
0x0)       = 0 0
access("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/\0", 0x1,
0x0)       = 0 0
access("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/specs\0",
0x4, 0x0) = -1 Err#2
access("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/../../../../aarch64-linux-gnu/lib/aarch64-linux-gnu/13.2.0/specs\0",
0x4, 0x0)               = -1 Err#2
access("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/../../../../aarch64-linux-gnu/lib/specs\0",
0x4, 0x0)                = -1 Err#2
access("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/specs\0", 0x4,
0x0)         = -1 Err#2
stat64("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/lto-wrapper\0",
0x16B8F32F8, 0x0)            = 0 0
access("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/lto-wrapper\0",
0x1, 0x0)            = 0 0
stat64("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/ld\0",
0x16B8F32E8, 0x0)             = -1 Err#2
stat64("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/ld\0",
0x16B8F32E8, 0x0)             = -1 Err#2
stat64("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/ld\0",
0x16B8F32E8, 0x0)    = -1 Err#2
stat64("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/ld\0",
0x16B8F32E8, 0x0)             = -1 Err#2
stat64("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/ld\0",
0x16B8F32E8, 0x0)    = -1 Err#2
stat64("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/../../../../aarch64-linux-gnu/bin/aarch64-linux-gnu/13.2.0/ld\0",
0x16B8F32E8, 0x0)          = -1 Err#2
stat64("/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/../../../../aarch64-linux-gnu/bin/ld\0",
0x16B8F32E8, 0x0)           = -1 Err#2
getrlimit(0x1008, 0x16B8F3308, 0x0)              = 0 0
fstat64(0x1, 0x16B8F3300, 0x0)           = 0 0
ioctl(0x1, 0x4004667A, 0x16B8F334C)              = 0 0
write_nocancel(0x1, "ld\n\0", 0x3)               = 3 0

Thanks for the reply, did I just misunderstood the documentation? So, the cross
gcc will find $sysroot/bin/ld instead of aarch64-linux-gnu-ld in $PATH? If so,
please close this bug because I deleted the binutils binary in the $sysroot...

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

* [Bug target/113648] Cross compiler cannot find cross binutils on macOS
  2024-01-29  5:38 [Bug target/113648] New: Cross compiler cannot find cross binutils on macOS galaxyking0419 at gmail dot com
  2024-01-29  5:53 ` [Bug target/113648] " pinskia at gcc dot gnu.org
  2024-01-29  6:46 ` galaxyking0419 at gmail dot com
@ 2024-01-29  8:47 ` schwab@linux-m68k.org
  2024-01-29  8:50 ` schwab@linux-m68k.org
  3 siblings, 0 replies; 5+ messages in thread
From: schwab@linux-m68k.org @ 2024-01-29  8:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
The preferred location is
/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/../../../../aarch64-linux-gnu/bin/aarch64-linux-gnu/13.2.0/ld
(known as gcc_tooldir in the makefile)

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

* [Bug target/113648] Cross compiler cannot find cross binutils on macOS
  2024-01-29  5:38 [Bug target/113648] New: Cross compiler cannot find cross binutils on macOS galaxyking0419 at gmail dot com
                   ` (2 preceding siblings ...)
  2024-01-29  8:47 ` schwab@linux-m68k.org
@ 2024-01-29  8:50 ` schwab@linux-m68k.org
  3 siblings, 0 replies; 5+ messages in thread
From: schwab@linux-m68k.org @ 2024-01-29  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> ---
Correction: the preferred location is
/Volumes/Toolchain/openwrt/lib/gcc/aarch64-linux-gnu/13.2.0/../../../../aarch64-linux-gnu/bin/ld

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

end of thread, other threads:[~2024-01-29  8:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29  5:38 [Bug target/113648] New: Cross compiler cannot find cross binutils on macOS galaxyking0419 at gmail dot com
2024-01-29  5:53 ` [Bug target/113648] " pinskia at gcc dot gnu.org
2024-01-29  6:46 ` galaxyking0419 at gmail dot com
2024-01-29  8:47 ` schwab@linux-m68k.org
2024-01-29  8:50 ` schwab@linux-m68k.org

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