Alien-TinyCCx
view release on metacpan or search on metacpan
inc/My/Build/Linux.pm view on Meta::CPAN
chdir 'src';
system($make, 'clean');
chdir '..';
}
use File::Path;
sub ACTION_install {
my $self = shift;
# For unixish systems, we must re-build with the new prefix so that all of
# the baked-in paths are correct. I just wanna say this:
#my $prefix = File::ShareDir::dist_dir('Alien-TinyCCx');
# Unfortunately, this won't work because File::ShareDir expects the
# folder to already exist.
# Instead, I copy code from Alien::Base::ModuleBuild to calculate the
# sharedir location by-hand:
my $prefix = File::Spec->catdir($self->install_destination('lib'),
qw(auto share dist Alien-TinyCCx));
lib/Alien/TinyCCx.pm view on Meta::CPAN
close $dh;
}
# Find the path to the tcc executable
sub path_to_tcc { $path_for_file{bin} }
# Modify the PATH environment variable to include tcc's directory
unshift @PATH, path_to_tcc();
# Find the path to the compiled libraries. Note that this is only applicable
# on Unixish systems; Windows simply uses the %PATH%, which was already
# appropriately set.
sub libtcc_library_path { $path_for_file{lib} }
# Add library path on Unixish:
if ($ENV{LD_LIBRARY_PATH}) {
$ENV{LD_LIBRARY_PATH} = libtcc_library_path() . ':' . $ENV{LD_LIBRARY_PATH};
}
elsif ($^O !~ /MSWin/) {
$ENV{LD_LIBRARY_PATH} = libtcc_library_path();
}
# Determine path for libtcc.h
sub libtcc_include_path { $path_for_file{inc} }
lib/Alien/TinyCCx.pm view on Meta::CPAN
/* This is the important one */
#include "libtcc.h"
=head1 DESCRIPTION
This module ensures that you have a copy of the Tiny C Compiler with
extended symbol table management accessible
to your Perl code, ensures that F<tcc> is in your path after saying
C<use Alien::TinyCCx>, ensures that F<libtcc> is in your C<LD_LIBRARY_PATH>
for Unixen and C<PATH> for Windows, and provides some functions for
identifying those paths and building against them.
This module is blissfully unaware of any other F<tcc> installations on your
system and it does not install F<tcc> into a generically usable location.
Rather, it installs it into a Perl-specific location. The basic idea is that
this Perl module should not interfere with your non-Perl stuff.
The provided path functions include:
=over
src/Changelog view on Meta::CPAN
- add support for load/store of _Bool value (Thomas Preud'homme)
- detect instruction with incorrect operands on x86-64 (Thomas Preud'homme)
- improved relocations on ARM (Thomas Preud'homme)
- add va_* macro implementation for ARM (Thomas Preud'homme)
- define __ARM_EABI__, __ARMEL__ and __ARM_PCS_VFP (Thomas Preud'homme)
- provide a runtime library for ARM (Thomas Preud'homme)
- vastly improved support for ARM hard float calling convention
(Thomas Preud'homme, Daniel Glöckner)
- tcc can uses libtcc1 on ARM (Thomas Preud'homme)
- use __fixdfdi for all float to integer conversion (grischka)
- simplify startup code for unix platforms (grischka)
- improve ELF generated on ARM (Thomas Preud'homme)
- add support for thumb to ARM relocation (Thomas Preud'homme)
- fix globbing to match MSVC on Windows (Thomas Preud'homme)
- deprecate FPA and OABI support for ARM (Thomas Preud'homme)
- warn about softfloat not being supported on ARM (Thomas Preud'homme)
Bug fixes:
- many code clean up (Urs Janssen, grischka)
- fixes of other's patches (grischka, Ramsay Jones, Michael Matz)
- fix documentation about __TINYC__ (Urs Janssen)
src/Changelog view on Meta::CPAN
- added verbosity levels -v, -vv, -vvv
- Accept standard input as an inputstream (Hanzac Chen)
- Support c89 compilers other than gcc (Hanzac Chen)
- -soname linker option (Marc Andre Tanner)
- Just warn about unknown directives, ignore quotes in #error/#warning
- Define __STDC_VERSION__=199901L (477)
- Switch to newer tccpe.c (includes support for resources)
- Handle backslashes within #include/#error/#warning
- Import changesets (part 4) 428,457,460,467: defines for openbsd etc.
- Use _WIN32 for a windows hosted tcc and define it for the PE target,
otherwise define __unix / __linux (Detlef Riekenberg)
- Import changesets (part 3) 409,410: ARM EABI by Daniel Glöckner
- Some in-between fixes:
TCC -E no longer hangs with macro calls involving newlines.
(next_nomacro1 now advances the read-pointer with TOK_LINEFEED)
Global cast (int g_i = 1LL;) no longer crashes tcc.
(nocode_wanted is initially 1, and only 0 for gen_function)
On win32 now tcc.exe finds 'include' & 'lib' even if itself is in 'bin'.
(new function w32_tcc_lib_path removes 'bin' if detected)
Added quick build batch file for mingw (win32/build-tcc.bat)
Last added case label optimization (455) produced wrong code. Reverted.
src/libtcc.c view on Meta::CPAN
#elif defined(TCC_TARGET_ARM64)
tcc_define_symbol(s, "__aarch64__", NULL);
#endif
#ifdef TCC_TARGET_PE
tcc_define_symbol(s, "_WIN32", NULL);
# ifdef TCC_TARGET_X86_64
tcc_define_symbol(s, "_WIN64", NULL);
# endif
#else
tcc_define_symbol(s, "__unix__", NULL);
tcc_define_symbol(s, "__unix", NULL);
tcc_define_symbol(s, "unix", NULL);
# if defined(__linux__)
tcc_define_symbol(s, "__linux__", NULL);
tcc_define_symbol(s, "__linux", NULL);
# endif
# if defined(__FreeBSD__)
tcc_define_symbol(s, "__FreeBSD__", "__FreeBSD__");
/* No 'Thread Storage Local' on FreeBSD with tcc */
tcc_define_symbol(s, "__NO_TLS", NULL);
# endif
# if defined(__FreeBSD_kernel__)
( run in 0.721 second using v1.01-cache-2.11-cpan-39bf76dae61 )