Git Product home page Git Product logo

cross-tools's Introduction

cross-tools makes setting up a new cross compiler for barebones OS development
easier. A safe set of configuration options has been chosen for each of the
program that you need for building for your target platform.

By default, (i.e., just running 'make'), it will install:
* GNU Binutils
* GCC (C language only)
* GDB

The default target host triple is arm-none-eabi. You can change this target by
setting the TARGET variable for make:

    make [target] TARGET=mipsel

You can install the tools for multiple host targets by running 'make clean' in
between each target. The tools for each target will all be installed along side
each-other.

The default installation location is $PWD/local-prefix. You can change the
installation location by setting the PREFIX variable for make:

    make [target] PREFIX=/usr/local

cross-tools's People

Contributors

caltry avatar ryanmentley avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

cross-tools's Issues

Seperate fetch and extract targets

I should have separate fetch and extract targets. It can be a real pain to fix a build error if we keep re-extracting gcc and friends.

Build of GCC fails when . is in PATH

When cross compiling GCC while the current directory is in the PATH variable, compilation fails with the error message:

checking for i686-pc-linux-gnu-gcc... (cached) gcc
checking for C compiler default output file name... 
configure: error: in `/tmp/dcl9934/cross-tools/build-gcc/gcc':
configure: error: C compiler cannot create executables
See `config.log' for more details.

If you go to compile gcc manually, you'll see a more useful message:

$ rm -rf build-gcc && mkdir build-gcc
$ cd build-gcc
$ ../gcc-4.7.2/configure --target=arm-none-eabi --prefix=/tmp/dcl9934/cross-tools/local-prefix --enable-languages=c --without-headers
$ make
gcc -c   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.7.2/gcc -I../../gcc-4.7.2/gcc/build -I../../gcc-4.7.2/gcc/../include -I../../gcc-4.7.2/gcc/../libcpp/include  -I../../gcc-4.7.2/gcc/../libdecnumber -I../../gcc-4.7.2/gcc/../libdecnumber/dpd -I../libdecnumber    \
            -o build/genconstants.o ../../gcc-4.7.2/gcc/genconstants.c
/tmp/dcl9934/cross-tools/local-prefix/arm-none-eabi/bin/as: unrecognized option '--32'

This problem here is that GCC creates a symlink to the 'as' for the target platform, and puts it in the build-gcc/gcc directory. So, when we try to compile something for the host, we end up using the target's 'as' instead!

gcc$ which as
./as
gcc$ as --verbose
GNU assembler version 2.23.1 (arm-none-eabi) using BFD version (GNU Binutils) 2.23.1

Either the user need to remove '.' from their path, or we should remove it from the environment when we build GCC by submake.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.