[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Cross-compiling tcc from macOS to Linux
From: |
Michael Ackermann |
Subject: |
Re: [Tinycc-devel] Cross-compiling tcc from macOS to Linux |
Date: |
Tue, 8 Apr 2025 14:05:54 +0000 |
Two patches are attached to help with cross-compiling with tinycc and
cross-compiling tinycc itself:
tcc-9999-library_path.patch to override system include and library search path
tcc-9999-makefile_cross.patch to address cross-compilation issues
Furthermore it helped to disable bounds-checker and backtrace options.
Since i maintain a complete distribution compiled with just tinycc containing
~500 builds with patches and hacks applied each i cannot refine all those
in detail to comply with various quality assurance acceptance criteria.
If anyone got an idea how to improve upon those two patches then suggestions are
welcome.
On 2025-04-08 08:36, Ludvig Christensen via Tinycc-devel wrote:
> Hi everyone!
>
> I am currently working on my master's thesis on [1]diverse
> double-compiling and have opted for using tcc.
>
> Right now I am trying to use x86_64-tcc (targeting x86_64 Linux) on
> macOS 15.1 to compile a native tcc for x86_64 Linux.
> The full build process is the following: (1) clang(16.0.6, target
> x86_64-apple-darwin24.1.0) -> (2) x86_64-tcc (0.9.28rc, target x86_64
> Linux) -> (3) tcc (0.9.28rc, target x86_64 Linux)
>
> I run into the problem when going from 2 to 3 where using: "./configure
> --cc=x86_64-tcc ..." causes c2str from conftest.c to be compiled for
> the cross target and thus not be able to run on the build os.
>
> Has anyone tried something like this and know of a good solution or
> configuration options?
> Otherwise I guess it should be possible to use a native(for build os)
> c2str and omitting that compilation step in the makefile.
>
> Thanks and kind regards,
>
> Ludvig Christensen
> __________________________________________________________________
>
> Observera att avsändaren inte är anställd vid Kungliga Tekniska
> högskolan. KTH ansvarar inte för åsikter, påståenden eller
> personuppgifter som förmedlas i detta meddelande.
> Please note that the sender is not employed by KTH Royal Institute of
> Technology. KTH is not responsible for the opinions, claims or personal
> data conveyed in this message.
>
> References
>
> 1. https://dwheeler.com/trusting-trust/
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
tcc-9999-library_path.patch
Description: Text document
tcc-9999-makefile_cross.patch
Description: Text document
signature.asc
Description: Digital signature