[Top][All Lists]

[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: Herman ten Brugge
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 17:02:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 3/14/23 16:24, avih wrote:
  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.


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:
The config-new-macho=no was the default with commit 62096265.

Can you change the code in 'tests/tcctest.c' on line 3865 to '#if GCC_MAJOR >= 40'. You probably have a very very old clang that does not have some builtin support but stll sets GCC_MAJOR to a value >= 4.

Not all platforms in tcc are auto detected. For some platforms have set configure options like '--with-selinux' or '--config-pie'.


reply via email to

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