Opened 12 years ago

Last modified 5 weeks ago

#38196 new submission

New port: tcc

Reported by: cooljeanius (Eric Gallager) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: harens (Haren S)
Port: tcc

Description

The latest version of Fabrice Bellard's Tiny C Complier (aka tcc) supports OS X, so I thought it would be a good idea to have a portfile for it. I've attached my attempt at creating one for it.

Attachments (4)

Portfile (1.5 KB) - added by cooljeanius (Eric Gallager) 12 years ago.
portfile for tcc
Portfile.2 (2.3 KB) - added by cooljeanius (Eric Gallager) 10 years ago.
a more recent version of my tcc Portfile
Portfile.diff (2.5 KB) - added by cooljeanius (Eric Gallager) 10 years ago.
diff between my old Portfile and my new one
Portfile.haren (840 bytes) - added by harens (Haren S) 12 months ago.

Download all attachments as: .zip

Change History (10)

Changed 12 years ago by cooljeanius (Eric Gallager)

Attachment: Portfile added

portfile for tcc

Changed 10 years ago by cooljeanius (Eric Gallager)

Attachment: Portfile.2 added

a more recent version of my tcc Portfile

Changed 10 years ago by cooljeanius (Eric Gallager)

Attachment: Portfile.diff added

diff between my old Portfile and my new one

comment:1 Changed 10 years ago by cooljeanius (Eric Gallager)

after coming across a request for this port in comment:ticket:37206:7, I was reminded of this ticket, and uploaded a more recent version of my Portfile for tcc here... it still needs a fixed livecheck, and a more accurate compiler whitelist/blacklist, though...

Last edited 10 years ago by cooljeanius (Eric Gallager) (previous) (diff)

comment:2 Changed 12 months ago by cooljeanius (Eric Gallager)

Update: I'm trying picking this up again; I get the following error when trying to bootstrap it, though:

tcc: error: invalid option -- '-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk'

(I'm on x86_64 Big Sur with Xcode 13 currently)

Edit: I just tried updating it from 0.9.26 to 0.9.27, but that just changes the error to:

ar rcs libtcc.a libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o x86_64-gen.o x86_64-link.o i386-asm.o
gcc -o tcc tcc.o libtcc.a -lm -ldl -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -flat_namespace -undefined warning 
ld: warning: building for macOS 10.2 is deprecated
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: error: ld returned 1 exit status
make: *** [tcc] Error 1
make: Leaving directory `/opt/local/var/macports/build/_Users_ericgallager_Documents_GitHub_macports-ports_lang_tcc/tcc/work/tcc-0.9.27'
Command failed:  cd "/opt/local/var/macports/build/_Users_ericgallager_Documents_GitHub_macports-ports_lang_tcc/tcc/work/tcc-0.9.27" && /usr/bin/make -j1 -w all 
Exit code: 2
Error: Failed to build tcc: command execution failed
DEBUG: Error code: CHILDSTATUS 62426 2
DEBUG: Backtrace: command execution failed
Last edited 12 months ago by cooljeanius (Eric Gallager) (previous) (diff)

comment:3 Changed 12 months ago by cooljeanius (Eric Gallager)

So I opened a draft PR for my current WIP Portfile for this ticket: https://github.com/macports/macports-ports/pull/21225

I still need help with it, though.

Changed 12 months ago by harens (Haren S)

Attachment: Portfile.haren added

comment:4 Changed 12 months ago by harens (Haren S)

Cc: harens added

I wrote a quick portfile here. Also attached above.

It built locally on macOS 12.4 21F79 arm64, Xcode 13.4.1 13F100. It also passed on the GitHub macOS builders.

tcc -run works fine locally. Not sure why I couldn't execute a compiled file though. Hope this helps and thanks for working on this Eric.

comment:5 in reply to:  4 Changed 4 months ago by cooljeanius (Eric Gallager)

Replying to harens:

I wrote a quick portfile here. Also attached above.

It built locally on macOS 12.4 21F79 arm64, Xcode 13.4.1 13F100. It also passed on the GitHub macOS builders.

tcc -run works fine locally. Not sure why I couldn't execute a compiled file though. Hope this helps and thanks for working on this Eric.

Thanks for the Portfile! Would you like to submit a PR for it, or should I?

comment:6 Changed 5 weeks ago by cooljeanius (Eric Gallager)

Note that TCC is relicensing, so the license field will have to be changed: https://repo.or.cz/tinycc.git/blob/3d963aebcd533da278f086a3e559d24b961e8c31:/RELICENSING

Note: See TracTickets for help on using tickets.