This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

adding crosstool support for building a statically-linked crosstoolchain


Hi Dan;

  Perhaps I'm the only one who wants/needs crosstool to provide a
statically linked cross toolchain, but, thanks to you and others who are
very bright and helpful, I have made such modifications to crosstool.

  I'll try to create a patch against crosstool-0.28-rc1 so that you can
see precisely what I've done.

  Once I've submitted a patch, will you consider applying it?

  Here are the details...

In the *demo*.sh files I have inserted this:
***********************************
STATICALLY_LINKED=yes
***********************************

In all.sh, I added this:
***********************************
test -z "${STATICALLY_LINKED}" && echo "STATICALLY_LINKED not set, so
building dynamically linked cross toolchain"
***********************************

In crosstool.sh, I have inserted this:
***********************************
test -z "${STATICALLY_LINKED}" && echo "STATICALLY_LINKED not set, so
building dynamically linked cross toolchain"
***********************************

and, for the build of binutils:

***********************************
if test -z "${STATICALLY_LINKED}"; then
    echo "...creating dynamically linked cross tool chain"
    make all 
else
    echo "...creating statically linked cross tool chain"
    make configure-host
    make configure-target
    make LDFLAGS="-all-static"
fi
make install 
***********************************

and, for the final gcc build:

***********************************
if test -z "${STATICALLY_LINKED}"; then
    echo "...creating dynamically linked cross tool chain"
    make all 
else
    echo "...creating statically linked cross tool chain"
    make LDFLAGS="-static" all 
fi
make install 
***********************************

Thanks,
Ken


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]