tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc broken on osx 10.13.6 since 62096265 "Add debug s


From: avih
Subject: Re: [Tinycc-devel] tcc broken on osx 10.13.6 since 62096265 "Add debug support to macos" (herman ten brugge)
Date: Tue, 14 Mar 2023 15:24:02 +0000 (UTC)

 On Tuesday, March 14, 2023, 02:53:19 PM GMT+2, Herman ten Brugge via 
Tinycc-devel <tinycc-devel@nongnu.org> wrote:

> I can only test things on macos 12.6 (aarch64) and macos 10.15.7 (x86_64).
> These 2 platforms work with head.
>
> I applied a lot of fixes since november so head is probably the best version.
>
>
> I do not understand why adding debug support fails for osx.
>
> The load command 0x80000034 is LC_DYLD_CHAINED_FIXUPS.
>
> This probably means that you have to configure with option
> '--config-new_macho=no'. If this stil fails can you sent me
> 'otool -l <exe>' of the failing executable and tcc.
>
> Herman


Thanks for the reply.

If indeed it should be invoked with --config-new_macho=no, would it
be possible to auto-detect it? (while still allowing override)

With commit 62096265, '--config-new_macho=no' does not seem to make
a difference, and "hello-exe" still fails the same, starting with:

------------ hello-exe ------------
dyld: REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 4 which is not a 
writable segment (__LINKEDIT) in /Users/avih/dev/tcc/tcc.upstream/tests/./hello
/bin/sh: line 1: 58643 Abort trap: 6 ./hello


With current mob (4dc4e93), '--config-new_macho=no' does make
a difference, where now "hello-exe", "hello-run", and "libtest" do
pass, and "libtest_mt" passes some tests and then fails:

------------ libtest_mt ------------
running fib with mixed calls
 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946
 (28 ms)
running fib in threads
 1 5 8 13 21 34 2 55 89 144 233 3 377 610 987 1597 2584 4181 6765 10946
 (23 ms)
running tcc.c in threads to run fib
 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946
 (4159 ms)
compiling tcc.c 10 times
 1 2 3 4 5 6 7 8 9 10
 (1608 ms)
tcctest.c:3878:15: error: use of unknown builtin '__builtin_clrsb' 
[-Wimplicit-function-declaration]
 cnt[9] += __builtin_clrsb(x);
 ^
tcctest.c:3879:16: error: use of unknown builtin '__builtin_clrsbl' 
[-Wimplicit-function-declaration]
 cnt[10] += __builtin_clrsbl(x);
 ^
tcctest.c:3879:16: note: did you mean '__builtin_clrsb'?
tcctest.c:3878:15: note: '__builtin_clrsb' declared here
 cnt[9] += __builtin_clrsb(x);
 ^
tcctest.c:3880:16: error: use of unknown builtin '__builtin_clrsbll' 
[-Wimplicit-function-declaration]
 cnt[11] += __builtin_clrsbll(x);
 ^
tcctest.c:3880:16: note: did you mean '__builtin_clrsbl'?
tcctest.c:3879:16: note: '__builtin_clrsbl' declared here
 cnt[10] += __builtin_clrsbl(x);
 ^
3 errors generated.
make[2]: *** [test.ref] Error 1
make[1]: *** [all] Error 2
make: *** [test] Error 2


While this does not seem like a load issue anymore, I'm still
attaching the full output of configure && make && make test,
as well as of 'otool -l ./tcc' with current mob (4dc4e93).

- avih

Attachment: tcc-configure-no-new-macho-make-make-test.txt
Description: Text document

Attachment: tcc-otool-l.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]