view sources/README @ 1532:a2e491cd0800

Fix source/target confusion that bites Fedora host = target builds. The gcc build exports an LD_LIBRARY_PATH full of target libraries and then calls /bin/sh in the configure stage. If you configure before building, this doesn't cause a problem because the libraries aren't there yet, but c++ has dependencies that trigger a C build before running configuration even if you reorder the steps. On ubuntu this doesn't cause a problem because /bin/sh doesn't link against anything in this LD_LIBRARY PATH, and when building a different architecture the foreign binaries are ignored by the dynamic linker. But on Fedora when host == target /bin/sh links against libgcc_s.so.1 which is in LD_LIBRARY_PATH linked against libc.so.0 which isn't installed on the host, and the attempt to run the shell dies saying it can't find uClibc. The fix is to override the make variable SHELL = sh so it calls ash out of build/host.
author Rob Landley <rob@landley.net>
date Thu, 16 Aug 2012 21:59:27 -0500
parents ad5303b6d35a
children c3b91b70cc42
line wrap: on
line source

The following files live here:

  include.sh: Common code included by every build stage.  Defines many
              environment variables, and sources the various *functions.sh.

  functions.sh: Shell functions internal to Aboriginal Linux.

  utility-functions.sh: Functions usable in contexts other than the Aboriginal
                        Linux build.

  download-functions.sh: Functions to manage package source.  (Download
                         tarballs, confirm checksums, extract and apply
                         patches, manage package cache.)

  timeout.sh: Wrapper to run a command line with a timeout.

  baseconfig-linux: Common miniconfig shared by most architectures, to which
                    $LINUX_CONFIG from the target/$ARCH/settings is appended.

  baseconfig-uClibc: Common miniconfig shared by all architectures, to which
                     $UCLIBC_CONFIG from the target/$ARCH/settings is appended.

The following subdirectories live here:

  native: Files copied verbatim into each architecture's root-filesystem image.

  toys: Various small code snippets written or maintained for this project.

  sections: Package build scripts called more than once during build.sh.
            This is duplicate code factored out into a common location.

  patches: Patches applied to the packages listed in download.sh by "setupfor".
           Each package has "$PACKAGE-*.patch" applied in alphabetical order,
           or "alt-$PACKAGE-*.patch" for USE_ALT versions.

  targets: Configuration for each target platform, parsed by load_target()
           and getconfig() in functions.sh.  Each entry is a target name,
           either a self-contained script setting configuration information,
           or else a directory containing:

      settings: Environment variables needed by the build.

      miniconfig-linux: linux kernel .config compressed by toys/miniconfig.sh
                        (If miniconfig-alt-linux exists, USE_ALT=linux
                         will use that instead.)

      miniconfig-uClibc: uClibc .config compressed by toys/miniconfig.sh
                         (If miniconfig-alt-uClibc exists, USE_ALT=uClibc
                          will use that instead.)

  root-filesystem: Files to be copied verbatim into the target filesystem.
                   Used by simple-root-filesystem.sh.