Commit Graph

157 Commits

Author SHA1 Message Date
Peter Korsgaard
0d6068ae01 Merge branch 'misc-fixes2' of git://git.busybox.net/~tpetazzoni/git/buildroot 2010-05-08 00:09:11 +02:00
Thomas Petazzoni
5e1fbd2c33 Fix the computation of REAL_GNU_TARGET_NAME
When the selected C library is glibc, the C library shouldn't be
mentionned in REAL_GNU_TARGET_NAME. In other words:

 arm-unknown-linux-uclibcgnueabi must be used for uClibc
 arm-unknown-linux-gnueabi must be used for glibc

This fixes the build of GDB on the target, as reported by Quotient
Remainder <quotientvremainder@gmail.com>.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-06 23:08:37 +02:00
Thomas Petazzoni
2eb4b09529 Add staging libraries directories to -L in external case
In order to solve issues of libtool trying to link target components
against host libraries, it seems that specifying -L$(STAGING_DIR)/lib
and -L$(STAGING_DIR)/usr/lib works.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-05-06 20:18:41 +02:00
Thomas Petazzoni
6b939d40f6 Add -rpath option for host package compilation
In c1b6242fdc, we added
$(HOST_DIR)/usr/lib to LD_LIBRARY_PATH when building target packages,
because the build of target packages sometimes require host tools
installed in $(HOST_DIR)/usr/bin which themselves require host
libaries installed in $(HOST_DIR)/usr/lib.

Unfortunately, this solution didn't work, as libtool then tried to
link target binaries against host libraries. So $(HOST_DIR)/usr/lib
got removed from LD_LIBRARY_PATH in
0d1830b07d.

However, this meant that we went back to the previous situation, in
which host tools used during compilation of target components might
require host libraries. An example :

make[2]: Entering directory `/home/test/buildroot/output.ctng-arm-eglibc-2010-05-04-12-41-00/build/xfont_font-adobe-100dpi-1.0.1'
/home/test/buildroot/output.ctng-arm-eglibc-2010-05-04-12-41-00/host/usr/bin/mkfontdir /home/test/buildroot/output.ctng-arm-eglibc-2010-05-04-12-41-00/target/usr/share/fonts/X11/100dpi
/home/test/buildroot/output.ctng-arm-eglibc-2010-05-04-12-41-00/host/usr/bin/mkfontscale: error while loading shared libraries: libfontenc.so.1: cannot open shared object file: No such file or directory

Therefore, we try another solution: make sure that host binaries are
linked with an -rpath option, so that $(HOST_DIR)/usr/lib doesn't need
to be in LD_LIBRARY_PATH for them to find their libraries.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-05-06 20:17:38 +02:00
Lionel Landwerlin
0d1830b07d package: Add $(HOST_DIR)/usr/lib to LD_LIBRARY_PATH for host but not target
Some packages like icu requires to be compiled against the host system
first to be able to compile against the target. This is due to the
usage of self generated binaries by the package to build itself. When
the generated tools also depends on generated libraries it is required
to add the path to these libraries in the library path
(LD_LIBRARY_PATH) especially for the configure step.

Adding $(HOST_DIR)/usr/lib to LD_LIBRARY_PATH for target compilation
might break the link step by mixing host libraries and target
binaries.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-03 13:37:11 +02:00
Thomas Petazzoni
65e80a0b0b Remove BR2_GNU_TARGET_SUFFIX and compute GNU_TARGET_NAME
Instead of asking the user about the GNU target suffix, just compute
it automatically from the other configuration options.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-03 00:00:08 +02:00
Thomas Petazzoni
d70a3800b2 Get rid of the code computing ROOTFS_SUFFIX
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-03 00:00:07 +02:00
Thomas Petazzoni
bf75987424 Get rid of KERNEL_CROSS
In both internal and external toolchain cases, KERNEL_CROSS was
defined to *exactly* the same value as TARGET_CROSS. It isn't modified
anywhere, and is just used by kernel compilation and pcmcia
compilation.

Therefore, get rid of KERNEL_CROSS and use TARGET_CROSS instead.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-03 00:00:06 +02:00
Thomas Petazzoni
4c5bf461cd Commonalize the definition of TOOLCHAIN_DIR
The definition of TOOLCHAIN_DIR is the same regardless of whether
external or internal toolchains are used. Moreover, move its
definition together with all the other *_DIR definitions.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-03 00:00:05 +02:00
Thomas Petazzoni
7b7a4be0e1 external toolchains: take into account architecture variant
Until now, many TARGET_CFLAGS where missing when using an external
toolchain, due to how package/Makefile.in was written. Now, a lot more
definitions are common between the Buildroot toolchain case and the
external toolchain case.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-17 02:09:38 +02:00
Thomas Petazzoni
04ba0089a6 Get rid of the OPTIMIZE_FOR_CPU variable
This variable, together with the FIXME comment, has been added has
part of Eric Andersen's « Major buildroot facelift, step one » commit
that occured in October 2004.

Since then, no real usage has been made of OPTIMIZE_FOR_CPU, and the
initial intention has probably been lost in the memories of the
implementors.

Therefore, get rid of the variable, and just use $(ARCH) at the two
locations the variable was used.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-11 21:10:35 +02:00
Thomas Petazzoni
ce3bd8da2a Get rid of now unused HOST_ARCH computation code
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-11 21:10:34 +02:00
Thomas Petazzoni
60281cbfe4 Guess build system and remove BR2_GNU_BUILD_SUFFIX
Instead of having a configuration option BR2_GNU_BUILD_SUFFIX, let's
use config.guess to guess the build system type.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-11 21:10:33 +02:00
Thomas Petazzoni
325bfd1cba Remove IMAGE and related configuration options
Now, we just hardcode the image filenames to be rootfs.$(FSTYPE), in
the $(BINARIES_DIR).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-04-09 11:04:35 +02:00
Yann E. MORIN
26b44b2b02 toolchain: prepare for more than two alternatives
Lay down the path to add more than two toolchain kinds:
- check the type of toolchain as:
    ifeq (toolchain_buildroot,y)
        blabla buildroot-specific
    else ifeq (toolchain_external,y)
        blabla external-specific
    endif

- prefer using positive checks, a-la:
    ifeq (foo,y)
  instead of:
    ifneq (bar,y)
  (where foo and bar are mutually exclusive)

- have the toolchain_buildroot case always appear first

- gettext is handled differently, because we want to add an option
  only if not using the buildroot toolchain, hence we use ifneq.

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Acked-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-03-31 10:53:12 +02:00
Thomas Petazzoni
405a7ecaa1 package infrastructure: add PERLLIB
Now that we build Perl modules in $(HOST_DIR), PERLLIB must be defined
to $(HOST_DIR)/usr/lib/perl.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-02-23 20:34:19 +01:00
Thomas Petazzoni
c1b6242fdc package infrastructure: add LD_LIBRARY_PATH
During the compilation of target or host packages, host tools might be
used, and in turn, they might use host libraries installed in
$(HOST_DIR)/usr/lib. Therefore, we pass a LD_LIBRARY_PATH variable
when building packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-02-23 20:33:26 +01:00
Lionel Landwerlin
96879ab1de package: fix unstripped binary installation
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-01-28 22:55:42 +01:00
Thomas Petazzoni
69fa47be3f Add $(HOST_DIR)/usr/sbin to the PATH
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-12-15 19:57:31 +01:00
Thomas Petazzoni
497abb8211 Define TARGET_MAKE_ENV similarly to HOST_MAKE_ENV
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-12-15 18:09:30 +01:00
Thomas Petazzoni
e11fe847b2 Add generic package infrastructure
This new infrastructure allows to write simpler .mk files for packages
not using the autotools as their build system, by factorizing many
common steps (download, extract, patching), and will more easily allow
Buildroot-wide changes in how the packages are handled.

The main macro is called GENTARGETS and works similarly to the
AUTOTARGETS macro that already exists for autotools-based
packages. However, the set of variables to be defined before calling
the macro is different. Refer to the documentation for details.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-12-15 18:09:23 +01:00
Thomas Petazzoni
bc994c533c Use BR2_TOOLCHAIN_BUILDROOT instead of BR2_TOOLCHAIN_SOURCE
The BR2_TOOLCHAIN_SOURCE option is removed in a future commit.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-12-14 23:54:47 +01:00
Peter Korsgaard
9e76714747 package: get rid of redundant malloc related configure presets
Those are already in TARGET_CONFIGURE_ARGS. Also get rid of unused
BR2_AC_CV_FUNC_MALLOC_0_NONNULL variable.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-12-06 19:58:45 +01:00
Peter Korsgaard
3445ff4ade package/Makefile.in: fix 'true' invocation for BR2_STRIP_none
Closes #701

Coreutils true doesn't understand a -Not_stripping argument.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-11-22 20:54:20 +01:00
Peter Korsgaard
9af188d883 toolchain/gcc: get rid of ancient 3.4.6 / 4.0.4 versions
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-10-29 21:11:28 +01:00
Bernhard Reutner-Fischer
0bc7a43ff3 remove BR2_FPU_SUFFIX
hard/softfloat is just one of the many config options, and it only
clutters the filenames.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-10-07 22:33:52 +02:00
Michael Roth
cb5710c538 rename TOOL_BUILD_DIR to TOOLCHAIN_DIR
To reflect the new output directory hierachy rename the Makefile variable
TOOL_BUILD_DIR to TOOLCHAIN_DIR.

Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-09-23 09:15:27 +02:00
Will Newton
51173980cd package/Makefile.in: Use appropriate paths for host pkg-config.
PKG_CONFIG_PATH adds a path to the pkg-config search path, but this is not
enough when we are building host tools - the host pkg-config default path
is still used, and this will pick up .pc files in the staging_dir tree.

PKG_CONFIG_LIBDIR overrides the pkg-config default path and ensures only
host .pc files are found. This fixes a pango build failure when building
for the host with cairo PNG support enabled.

Signed-off-by: Will Newton <will.newton@gmail.com>
2009-09-20 19:34:27 +01:00
Thomas Petazzoni
3b2a803d28 Rename the output directories
In the output directory, we now have

 - build/    where all the packages are built
 - images/   where the final kernel and rootfs images are stored
 - staging/  the staging directory (containing the development files
             and libraries compiled for the target)
 - target/   which contains the target root filesystem
 - host/     which contains all the host programs
 - stamps/   which contains the stamps files

Therefore, the build_ARCH and toolchain_build_ARCH have been
removed. People willing to use the same Buildroot sources to compile
for different architectures are invited to use the O= command line
option for out-of-tree compilation.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-16 20:33:31 +02:00
Thomas Petazzoni
fd3800c197 Remove BR2_TOPDIR_PREFIX and BR2_TOPDIR_SUFFIX
The same effect can be done using out-of-tree build with O=

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-16 20:33:27 +02:00
Thomas Petazzoni
3c35d55ea9 packages: use qstrip
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-09-05 14:43:17 +02:00
Peter Korsgaard
717aaab9e8 package/Makefile.in: use := for INSTALL
So it doesn't get reevaluated every time and for consistency with FLEX/BISON.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-08-26 09:52:51 +02:00
Thomas Petazzoni
7e62e8ec72 Remove --without-html-dir from DISABLE_DOCUMENTATION
In an attempt to disable the compilation and installation of
documentation of gtk packages, a DISABLE_DOCUMENTATION variable
containing --without-html-dir has been added to
package/Makefile.in. This variable is used by
package/Makefile.autotools.in so that --without-html-dir is in effect
passed to all autotools-based packaging relying on the
Makefile.autotools.in infrastructure.

Unfortunately, --without-html-dir doesn't work. It leads libglib2
./configure script to think that HTML_DIR is "no", which leads to the
installation of the documentation in $(STAGING_DIR)no (yes, with the
"no" suffix at the end). The issue is that --with-html-dir is not an
enable/disable type of option, it's an option that only allows to pass
a PATH for documentation installation.

As we don't want the documentation to be installed in this odd
$(STAGING_DIR)no directory, we simply get rid of this option.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-08-08 20:21:58 +02:00
Thomas Petazzoni
1a2433b58e makefile: don't hardcore install utility location
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-07-31 08:48:03 +02:00
Thomas Petazzoni
4e9807a645 makefile: remove unused AUTO_CONFIGURE_OPTS variable
The AUTO_CONFIGURE_OPTS is not used anywhere in the tree. autoconf
based packages should used the Makefile.autotools.in machinery
instead.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-07-30 16:53:46 +02:00
Peter Korsgaard
441c122606 Merge branch 'xorg' of git://git.busybox.net/~tpetazzoni/git/buildroot 2009-07-25 09:13:44 +02:00
Thomas Petazzoni
74ecbaa23d xorg: remove the XSERVER variable
The XSERVER variable used to be defined by package/Makefile.in because
the X server package name was different depending on the type of X
server that was choosen. Nowadays, the name of the package is always
xserver_xorg-server, so there's no point in having this XSERVER
intermediate variable.

This patch makes all packages use xserver_xorg-server directly as a
dependency, and removes the XSERVER variable from package/Makefile.in.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-07-24 23:26:48 +02:00
Thomas Petazzoni
b36a589480 xorg: remove references to non-existing configuration options
The option BR2_PACKAGE_TINY, BR2_PACKAGE_XORG and BR2_PACKAGE_XGGI
don't exist, so do not use them to find the value of the $(XSERVER)
variable.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-07-24 23:26:48 +02:00
Maxim Grigoriev
6b27f42180 package/Makefile.in: xtensa host support
Part of #163.

Signed-off-by: Maxim Grigoriev <maxim2405@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-07-24 02:12:27 +02:00
Thomas Petazzoni
b5d6f341c5 external toolchain: add $(HOST_DIR)/bin to TARGET_PATH
Since the move of many host binaries to $(HOST_DIR), the TARGET_PATH
for internal toolchain had been changed to include $(HOST_DIR)/bin and
$(HOST_DIR)/usr/bin, but this change was not reflected to the
TARGET_PATH used in external toolchain configuration. This patches
fixes this.

We also remove $(STAGING_DIR)/bin and $(STAGING_DIR)/usr/bin from the
TARGET_PATH in external toolchain configuration, since the STAGING_DIR
is not supposed to contain host binaries.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-07-17 17:23:44 +02:00
Peter Korsgaard
a0352751ac package: set CXX to false rather than "" if no C++ support is enabled
Some configure scripts seems to ignore CXX settings if it is set to
the empty string, and goes back to the default (<arch>-linux-g++),
so use false instead, as that will loudly break the build if the
C++ compiler is ever used.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-05-04 21:22:44 +02:00
Thomas Petazzoni
fb56c53e39 Another external toolchain fix
Change the definition of TARGET_LDFLAGS to use --sysroot
$(STAGING_DIR) instead of -L$(STAGING_DIR)/lib
-L$(STAGING_DIR)/usr/lib. It fixes the following failure while trying
to build mtd-utils :

/usr/local/xtools/arm-unknown-linux-uclibcgnueabi/bin/arm-unknown-linux-uclibcgnueabi-gcc -L/home/thomas/local/buildroot-output/build_arm/staging_dir/lib -L/home/thomas/local/buildroot-output/build_arm/staging_dir/usr/lib -o /home/thomas/local/buildroot-output/build_arm/mtd_orig/flash_eraseall /home/thomas/local/buildroot-output/build_arm/mtd_orig/crc32.o /home/thomas/local/buildroot-output/build_arm/mtd_orig/flash_eraseall.o
/usr/local/xtools/arm-unknown-linux-uclibcgnueabi/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.2/../../../../arm-unknown-linux-uclibcgnueabi/bin/ld: cannot find /lib/libc.so.0
collect2: ld returned 1 exit status
make[1]: *** [/home/thomas/local/buildroot-output/build_arm/mtd_orig/flash_eraseall] Error 1

At the same time, simplify the definition of TARGET_CFLAGS, because
the -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include
-I$(TOOLCHAIN_EXTERNAL_PATH)/$(TOOLCHAIN_EXTERNAL_PREFIX)/include are
no longer necessary since we sysroot the toolchain in $(SYSROOT_DIR).

This patch has no effect on non-external toolchain builds.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2009-03-29 18:32:18 +00:00
Peter Korsgaard
e7b38c71ce package: add STAMP_DIR and use for host builds
Move stamp (dependency) files outside the (version specific) source
directories, so other packages can hardcode dependencies on them instead
of having to use <PACKAGE>_VERSION variables.

This is important as the variables in the make rules are evaluated when
the rules is seen, which might be before the dependent makefile is parsed
(and hence <PACKAGE>_VERSION variable is known, screwing up stuff.

The downside of this is that the package isn't automatically rebuilt
when the version changes (E.G. by a svn update) and you now also have to
remove the stamp files next to $(BUILD_DIR)/<PACKAGE>-* to force a rebuild.
2009-03-19 11:06:47 +00:00
Peter Korsgaard
849c45648d pkg-config: rename pkgconfig to pkg-config
This matches upstream tarball, doesn't screw up existing .config's with
BR2_PACKAGE_PKGCONFIG and makes sure the patch gets applied for target
compilation.
2009-03-19 08:30:20 +00:00
Peter Korsgaard
b451015203 pkgconfig: install into HOST_DIR 2009-03-18 19:18:40 +00:00
Peter Korsgaard
00400f4720 package: add HOST_DIR to target path 2009-03-17 13:48:29 +00:00
Peter Korsgaard
4311f0fe39 package: fix host path
And generate dbus introspect xml for dbus-glib.
2009-03-17 13:48:15 +00:00
Peter Korsgaard
40a54252eb package/Makefile.in: search $(HOST_DIR) for host includes / libraries 2009-03-16 20:58:08 +00:00
Peter Korsgaard
bd07d92aad Makefile: introduce $(HOST_DIR) for host binaries
Add HOST_DIR directory handling. HOST_DIR should be used just like
STAGING_DIR, but for host files instead of target ones.
2009-03-16 15:48:43 +00:00
Peter Korsgaard
2c89d7aeb6 mpg123: remove arm funroll-loops workaround
Fixed by toolchain patch.
2009-02-05 13:24:18 +00:00