Rechercher une page de manuel
gccross
Langue: en
Version: 313911 (ubuntu - 07/07/09)
Section: 1 (Commandes utilisateur)
NAME
gccross --- a tool to wrap GCC calls in cross-compile aware mannerSYNOPSIS
gccross [any parameter will be forwarded to GCC ]
DESCRIPTION
gccross is a tool which changes pathnames of GCC command line arguments -I, -L and any standalone full qualified file name, as defined in cross-compile configuration file. The conversion rules are the same as used by dpkg-cross so in most cases use of gccross allows you not to change your Makefiles to cross-compile your application.
To use gccross without dpkg-buildpackage you have to create symlinks for your cross-compiler that point to gccross. gccross identifies your compiler and convert all calling parameters based on your configuration.
No conversion is done if the architecture is not specified. dpkg-buildpackage sets the environment variable ARCH by default so you do not have to worry about
this.
Using gccross outside of the Debian build process your have to choices where the host architecture is specified, cross-compile (local and system wide) or the environment variable ARCH
# export ARCH=powerpc # for fn in cc cpp gcc g++; do ln -s /usr/share/dpkg-cross/bin/gccross /usr/local/bin/powerpc-linux-$fn; done # export GCCROSS_PREFIX=/usr/bin/ccache
This example assumes that /usr/local/bin is in your PATH before the directory that contains real cross-compiler binary.
The GCCROSS_PREFIX environment variable makes it simple to let an secondary tool precede your compiler. In this example we use the ccache compiler cache. Without GCCROSS_PREFIX the compiler is called directly.
gccross searches in PATH for compiler executable, skipping itself automatically.
When converting arguments, gccross leaves as is any pathnames that point to GCC library directory /usr/lib/gcc-lib and it's subdirectories, as well as directories that contain headers and libraries for the target.
FILES
/etc/dpkg-cross/cross-compile
SEE ALSO
dpkg-cross(1), cross-compile(5), /usr/share/doc/dpkg-cross/README.Debian.gz
AUTHORS
Raphael Bossek <bossekr@debian.org>
Neil Williams <codehelp@debian.org>
VERSION
$Revision: 1.7 $
COPYRIGHT
Copyright © 2007 Raphael Bossek
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre