]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
naoki: Add toolchain features.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 9 Jan 2010 15:28:10 +0000 (16:28 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 9 Jan 2010 15:28:10 +0000 (16:28 +0100)
Fixes lot of things in the toolchain, etc.
Adding testsuites.

40 files changed:
make.sh
naoki/__init__.py
naoki/chroot.py
naoki/constants.py
naoki/package.py
pkgs/Include
pkgs/core/bzip2/bzip2.nm
pkgs/core/glibc/glibc.nm
pkgs/toolchain/acl/acl.nm
pkgs/toolchain/attr/attr.nm
pkgs/toolchain/autoconf/autoconf.nm [deleted file]
pkgs/toolchain/automake/automake.nm [deleted file]
pkgs/toolchain/bash/bash.nm
pkgs/toolchain/binutils-static/binutils-static.nm
pkgs/toolchain/binutils/binutils.nm
pkgs/toolchain/bzip2/bzip2.nm
pkgs/toolchain/coreutils/coreutils.nm
pkgs/toolchain/cpio/cpio.nm
pkgs/toolchain/diffutils/diffutils.nm
pkgs/toolchain/file/file.nm
pkgs/toolchain/findutils/findutils.nm
pkgs/toolchain/gawk/gawk.nm
pkgs/toolchain/gcc-static/gcc-static.nm
pkgs/toolchain/gcc/gcc.nm
pkgs/toolchain/gcc/include-append [new file with mode: 0644]
pkgs/toolchain/gettext/gettext.nm
pkgs/toolchain/glibc/glibc.nm
pkgs/toolchain/grep/grep.nm
pkgs/toolchain/gzip/gzip.nm
pkgs/toolchain/kernel-headers/kernel-headers.nm
pkgs/toolchain/m4/m4.nm
pkgs/toolchain/make/make.nm
pkgs/toolchain/ncurses/ncurses.nm
pkgs/toolchain/patch/patch.nm
pkgs/toolchain/perl/perl.nm
pkgs/toolchain/sed/sed.nm
pkgs/toolchain/tar/tar.nm
pkgs/toolchain/texinfo/texinfo.nm
pkgs/toolchain/xz/xz.nm
pkgs/toolchain/zlib/zlib.nm [deleted file]

diff --git a/make.sh b/make.sh
index cddabc74d7f38adacc38690b0a2e15e14b92d43c..1e898d01df3b973f81c1d1dc106e592c65053665 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -7,6 +7,10 @@ import naoki
 
 op = OptionParser()
 
+# toolchain mode
+op.add_option("--toolchain", action="store_const", const=1,
+                               dest="toolchain", default=0, help="toolchain mode")
+
 # verbosity
 op.add_option("-v", "--verbose", action="store_const", const=2,
                                dest="verbose", default=1, help="verbose build")
index 43a256d7e0f2a23cac47a2a4841524141a06c829..27621f2d2e920ab9e98d34435b13d79b1ad0ce55 100644 (file)
@@ -30,6 +30,7 @@ class Naoki(object):
                self.log = logging.getLogger()
 
                self.config = config
+               self.config["toolchain"] = self.options.toolchain
                self.setup_logging()
                
                self.log.info("Started naoki on %s" % time.strftime("%a, %d %b %Y %H:%M:%S"))
@@ -95,11 +96,19 @@ class Naoki(object):
                elif action == "list-groups":
                        print "\n".join(package.groups())
 
+               elif action == "list-tree":
+                       for a in package.deptree(package.list()):
+                               print a
+
                elif action == "rebuild":
+                       if not self.packages:
+                               self.packages = package.list()
                        self.build()
 
+
        def build(self):
                requeue = []
+               self.packages = package.depsort(self.packages)
                while True:
                        if not self.packages:
                                return
@@ -108,7 +117,15 @@ class Naoki(object):
                        build = Build(self.packages.pop(0))
                        
                        if build.package.isBuilt:
+                               if self.options.toolchain:
+                                       self.log.info("Skipping already built package %s..." % build.package.name)
+                                       continue
                                self.log.warn("Package is already built. Will overwrite.")
+                       
+                       #if not build.package.canBuild:
+                       #       self.log.warn("Cannot build package %s. Requeueing. %s" % (build.package.name, build.package.toolchain_deps))
+                       #       self.packages.append(build.package)
+                       #       continue
 
                        self.log.info("Building %s..." % build.package.name)
                        build.build()
@@ -123,8 +140,9 @@ class Build(object):
        def init(self):
                self.environment.init()
 
-               self.extractAll()
-       
+               if not self.package.toolchain:
+                       self.extractAll()
+
        def extractAll(self):
                packages = self.package.deps + self.package.build_deps
                for pkg in config["mandatory_packages"]:
@@ -140,10 +158,5 @@ class Build(object):
        def build(self):
                self.package.download()
                self.init()
-               self.make("package")
+               self.environment.make("package")
 
-       def make(self, target):
-               file = self.package.filename.replace(BASEDIR, "/usr/src")
-               cmd = "make --no-print-directory -C %s -f %s %s" % (os.path.dirname(file),
-                       file, target,)
-               self.environment.doChroot(cmd)
index 8697c65ca15e74326980428e522d4303821e8570..c57d388574a165de9d52fe381879895e6fe2e751 100644 (file)
@@ -15,8 +15,16 @@ class Environment(object):
                self.package = package
                self.config = config
 
+               # Indication if we run in toolchain mode
+               self.toolchain = self.package.toolchain
+
                # mount/umount
-               self.umountCmds = [
+               self.umountCmds = []
+               self.mountCmds = []
+               
+               if not self.toolchain:
+                       self.umountCmds.extend([
+                               "umount -n %s" % self.chrootPath("tools_i686"),
                                "umount -n %s" % self.chrootPath("proc"),
                                "umount -n %s" % self.chrootPath("sys"),
                                "umount -n %s" % self.chrootPath("usr", "src", "cache"),
@@ -24,16 +32,17 @@ class Environment(object):
                                "umount -n %s" % self.chrootPath("usr", "src", "pkgs"),
                                "umount -n %s" % self.chrootPath("usr", "src", "src"),
                                "umount -n %s" % self.chrootPath("usr", "src", "tools"),
-               ]
-               self.mountCmds = [
+                       ])
+                       self.mountCmds.extend([
+                               "mount -n --bind %s/tools_i686 %s" % (TOOLCHAINSDIR, self.chrootPath("tools_i686")),
                                "mount -n -t proc naoki_chroot_proc %s" % self.chrootPath("proc"),
                                "mount -n -t sysfs naoki_chroot_sysfs %s" % self.chrootPath("sys"),
-                               "mount -n --bind -o ro %s %s" % (os.path.join(CACHEDIR), self.chrootPath("usr", "src", "cache")),
-                               "mount -n --bind -o ro %s %s" % (os.path.join(PACKAGESDIR), self.chrootPath("usr", "src", "packages")),
-                               "mount -n --bind -o ro %s %s" % (os.path.join(PKGSDIR), self.chrootPath("usr", "src", "pkgs")),
-                               "mount -n --bind -o ro %s %s" % (os.path.join(BASEDIR, "src"), self.chrootPath("usr", "src", "src")),
-                               "mount -n --bind -o ro %s %s" % (os.path.join(TOOLSDIR), self.chrootPath("usr", "src", "tools")),
-               ]
+                               "mount -n --bind %s %s" % (os.path.join(CACHEDIR), self.chrootPath("usr", "src", "cache")),
+                               "mount -n --bind %s %s" % (os.path.join(PACKAGESDIR), self.chrootPath("usr", "src", "packages")),
+                               "mount -n --bind %s %s" % (os.path.join(PKGSDIR), self.chrootPath("usr", "src", "pkgs")),
+                               "mount -n --bind %s %s" % (os.path.join(BASEDIR, "src"), self.chrootPath("usr", "src", "src")),
+                               "mount -n --bind %s %s" % (os.path.join(TOOLSDIR), self.chrootPath("usr", "src", "tools")),
+                       ])
 
                self.buildroot = "buildroot.%d" % random.randint(0, 1024)
                self.log = None
@@ -65,6 +74,7 @@ class Environment(object):
                        self.chrootPath("sbin"),
                        self.chrootPath("sys"),
                        self.chrootPath("tmp"),
+                       self.chrootPath("tools_i686"),
                        self.chrootPath("usr/src/cache"),
                        self.chrootPath("usr/src/packages"),
                        self.chrootPath("usr/src/pkgs"),
@@ -83,7 +93,7 @@ class Environment(object):
                )
                for item in files:
                        util.touch(self.chrootPath(item))
-               
+
                self._setupDev()
                self._setupUsers()
                self._setupToolchain()
@@ -92,13 +102,12 @@ class Environment(object):
                pass
        
        def make(self, target):
-               file = self.package.filename.replace(BASEDIR, "/usr/src")
-               try:
-                       self._mountall()
-                       self.doChroot("make --no-print-directory -C %s -f %s %s" % \
-                               (os.path.dirname(file), file, target), shell=True)
-               finally:
-                       self._umountall()
+               file = self.package.filename
+               if not self.toolchain:
+                       file = "/usr/src%s" % file[len(BASEDIR):]
+
+               return self.doChroot("make --no-print-directory -C %s -f %s %s" % \
+                       (os.path.dirname(file), file, target), shell=True)
 
        def doChroot(self, command, shell=True, *args, **kwargs):
                ret = None
@@ -107,21 +116,36 @@ class Environment(object):
                        env = config.environment.copy()
                        env.update({
                                "HOME"           : "/root",
-                               "PATH"           : "/sbin:/bin:/usr/sbin:/usr/bin:/tools_i686/sbin:/tools_i686/bin",
-                               "TERM"           : os.environ["TERM"],
-                               "PS1"            : os.environ.get("PS1", "\u:\w\$ "),
                                "BASEDIR"        : "/usr/src",
-                               "BUILDROOT"      : "/%s" % self.buildroot,
                                "PKGROOT"        : "/usr/src/pkgs",
-                               "CHROOT"         : "1",
+                               "TOOLS_DIR"      : "/tools_i686",
+                               "TARGET"         : "i686-ipfire-linux-gnu",
+                               "TARGET_MACHINE" : "i686",
                        })
+                       if self.toolchain:
+                               env.update({
+                                       "PATH"           : "/tools_i686/sbin:/tools_i686/bin:%s" % os.environ["PATH"],
+                                       "TOOLCHAIN"      : "1",
+                                       "PKGROOT"        : PKGSDIR,
+                                       "ROOT"           : self.chrootPath(),
+                                       "BASEDIR"        : BASEDIR,
+                               })
+                       else:
+                               env.update({
+                                       "PATH"           : "/sbin:/bin:/usr/sbin:/usr/bin:/tools_i686/sbin:/tools_i686/bin",
+                                       "BUILDROOT"      : "/%s" % self.buildroot,
+                                       "CHROOT"         : "1",
+                               })
 
                        if kwargs.has_key("env"):
                                env.update(kwargs.pop("env"))
 
                        self._mountall()
+                       
+                       if not self.toolchain and not kwargs.has_key("chrootPath"):
+                               kwargs["chrootPath"] = self.chrootPath()
 
-                       ret = util.do(command, chrootPath=self.chrootPath(),
+                       ret = util.do(command,
                                shell=shell, env=env, logger=self.log, *args, **kwargs)
 
                finally:
@@ -129,9 +153,13 @@ class Environment(object):
                
                return ret
 
+       do = doChroot
+
        def chrootPath(self, *args):
                return os.path.join(BUILDDIR, "environments", self.package.id, *args)
 
+       path = chrootPath
+
        def _setupLogging(self):
                logfile = os.path.join(LOGDIR, self.package.id, "build.log")
                if not os.path.exists(os.path.dirname(logfile)):
@@ -143,6 +171,9 @@ class Environment(object):
                self.log.addHandler(fh)
 
        def _setupDev(self):
+               if self.toolchain:
+                       return
+
                # files in /dev
                util.rm(self.chrootPath("dev"))
                util.mkdir(self.chrootPath("dev", "pts"))
@@ -184,6 +215,9 @@ class Environment(object):
                                self.mountCmds.append(devMntCmd)
 
        def _setupUsers(self):
+               if self.toolchain:
+                       return
+
                ## XXX Could be done better
                self.log.debug("Creating users")
                f = open("/etc/passwd")
@@ -205,14 +239,6 @@ class Environment(object):
                f.close()
 
        def _setupToolchain(self):
-               if os.path.exists(self.chrootPath("tools_i686")):
-                       return
-               
-               self.log.debug("Extracting toolchain...")
-
-               util.do("tar xfz %s -C %s" % (TOOLCHAIN_TARBALL, self.chrootPath()),
-                       shell=True)
-               
                symlinks = (
                        "bin/bash",
                        "bin/sh",
index a0f1ec944b974a798265b78bdeae10a030e57183..4493c8b213a9dcc5de106c96e5dabb7cdfe843dd 100644 (file)
@@ -11,6 +11,7 @@ CONFIGDIR = os.path.join(BASEDIR, "config")
 LOGDIR = os.path.join(BASEDIR, "logs")
 PKGSDIR = os.path.join(BASEDIR, "pkgs")
 PACKAGESDIR = os.path.join(BUILDDIR, "packages")
+TOOLCHAINSDIR = os.path.join(BUILDDIR, "toolchains")
 TOOLSDIR = os.path.join(BASEDIR, "tools")
 
 TARBALLDIR = os.path.join(CACHEDIR, "tarballs")
@@ -18,10 +19,9 @@ PATCHESDIR = os.path.join(CACHEDIR, "patches")
 
 CONFIGFILE = os.path.join(CONFIGDIR, "naoki.conf")
 
-TOOLCHAIN_TARBALL = os.path.join(BUILDDIR, "tools_i686.tar.gz")
-
 class Config(object):
        _items = {
+               "toolchain" : False,
                "mandatory_packages" : [
                        "core/bash",
                        "core/gcc",
@@ -77,6 +77,9 @@ class Config(object):
        @property
        def environment(self):
                return {
+                       "TERM"           : os.environ["TERM"],
+                       "PS1"            : os.environ.get("PS1", "\u:\w\$ "),
+                       #
                        "DISTRO_NAME"    : self["distro_name"],
                        "DISTRO_SNAME"   : self["distro_sname"],
                        "DISTRO_EPOCH"   : self["distro_epoch"],
index beb991d0e58ebbf5497f6231876c760761807f53..2d029580cc41612e590cdbb2182e5bdb482cce34 100644 (file)
@@ -16,8 +16,15 @@ def list():
        for dir in os.listdir(PKGSDIR):
                if not os.path.isdir(os.path.join(PKGSDIR, dir)):
                        continue
-               if dir == "toolchain":
-                       continue #XXX
+
+               # If we work in toolchain mode we don't return the other
+               # packages and if we are not, we don't return the toolchain packages.
+               if config["toolchain"]:
+                       if dir != "toolchain":
+                               continue
+               else:
+                       if dir == "toolchain":
+                               continue
 
                for package in os.listdir(os.path.join(PKGSDIR, dir)):
                        package = os.path.join(dir, package)
@@ -27,12 +34,15 @@ def list():
        return pkgs
 
 def find(s):
+       if not s:
+               return
+
        p = Package(s)
        if p in list():
                return p
 
        for package in list():
-               if package.name.endswith("%s" % s):
+               if os.path.basename(package.name) == s:
                        return package
 
 def groups():
@@ -102,6 +112,34 @@ def depsolve(packages, recursive=False):
                deps.sort()
                return deps
 
+def deptree(packages):
+       ret = [packages]
+
+       while True:
+               next = []
+               stage = ret[-1][:]
+               for package in stage[:]:
+                       for dep in package.getAllDeps(recursive=False):
+                               if dep in ret[-1]:
+                                       stage.remove(package)
+                                       next.append(package)
+                                       break
+               
+               ret[-1] = sorted(stage)
+               if next:
+                       ret.append(sorted(next))
+                       continue
+
+               break
+
+       return ret
+
+def depsort(packages):
+       ret = [] 
+       for l1 in deptree(packages):
+               ret.extend(l1)
+       return ret
+
 class Package(object):
        info_str = """\
 Name        : %(name)s
@@ -240,15 +278,34 @@ Patches     :
                                deps.append(package)
                return depsolve(deps, recursive)
 
+       def getAllDeps(self, recursive=True):
+               if self.toolchain:
+                       return depsolve(self.toolchain_deps, recursive)
+
+               return depsolve(self.deps + self.build_deps, recursive)
+
        @property
        def build_deps(self):
                deps = []
                for package in self.fetch("PKG_BUILD_DEPENDENCIES").split(" "):
-                       deps.append(find(package))
+                       package = find(package)
+                       if package:
+                               deps.append(package)
                
                deps.sort()
                return deps
 
+       @property
+       def toolchain_deps(self):
+               deps = []
+               for package in self.fetch("PKG_TOOLCHAIN_DEPENDENCIES").split(" "):
+                       package = find(package)
+                       if package:
+                               deps.append(package)
+
+               deps.sort()
+               return deps
+
        @property
        def url(self):
                return self.fetch("PKG_URL")
@@ -290,6 +347,9 @@ Patches     :
 
        @property
        def isBuilt(self):
+               if self.toolchain:
+                       return os.path.exists(self.toolchain_file)
+
                for item in self.package_files:
                        if not os.path.exists(os.path.join(PACKAGESDIR, item)):
                                return False
@@ -297,6 +357,12 @@ Patches     :
 
        @property
        def canBuild(self):
+               if self.toolchain:
+                       for dep in self.toolchain_deps:
+                               if not dep.isBuilt:
+                                       return False
+                       return True
+
                deps = self.deps + self.build_deps
                for dep in deps:
                        if not dep.isBuilt:
@@ -312,3 +378,13 @@ Patches     :
                getLog().debug("Extracting %s..." % self.name)
                util.do("%s --root=%s %s" % (os.path.join(TOOLSDIR, "decompressor"),
                        dest, " ".join(files)), shell=True)
+
+       @property
+       def toolchain(self):
+               if self.name.startswith("toolchain"):
+                       return True
+               return False
+
+       @property
+       def toolchain_file(self):
+               return os.path.join(TOOLCHAINSDIR, "tools_i686", "built", self.id)
index c449892b71d5d07c060b69132fe4cfb48d7330bd..0e21eb4e00e00db82e05ebf4f15533ec6a437115 100644 (file)
@@ -114,6 +114,18 @@ define DO_BUILD
        @echo "#####################################################################"
 endef
 
+define DO_TEST
+       @echo "#####################################################################"
+       @echo "# $(PKG_NAME) - Test started"
+       @echo "#####################################################################"
+
+       $(STAGE_TEST)
+
+       @echo "#####################################################################"
+       @echo "# $(PKG_NAME) - Test finished"
+       @echo "#####################################################################"
+endef
+
 define DO_INSTALL
        @echo "#####################################################################"
        @echo "# $(PKG_NAME) - Install started"
@@ -136,6 +148,7 @@ define STAGE_PREPARE
        $(if $(PKG_PATCHES),$(DO_PATCHES))
 
        $(STAGE_PREPARE_CMDS)
+       $(STAGE_PREPARE_CMDS2)
 endef
 
 define STAGE_BUILD
@@ -167,9 +180,7 @@ info:
        @echo "PKG_REL=\"$(PKG_REL)\""
        @echo "PKG_SUMMARY=\"$(strip $(PKG_SUMMARY))\""
        @echo "PKG_URL=\"$(PKG_URL)\""
-ifeq "$(TOOLCHAIN)" "1"
        @echo "PKG_TOOLCHAIN_DEPENDENCIES=\"$(PKG_TOOLCHAIN_DEPS)\""
-endif
 
 $(OBJECTS):
        @echo "Object file \"$@\" is required." >&2
@@ -192,5 +203,6 @@ shell: $(OBJECTS)
 $(STAGE_DONE): $(OBJECTS)
        $(if $(STAGE_PREPARE),$(DO_PREPARE))
        $(if $(STAGE_BUILD),$(DO_BUILD))
+       $(if $(STAGE_TEST),$(DO_TEST))
        $(if $(STAGE_INSTALL),$(DO_INSTALL))
        @touch $@
index a6f232757fadc84816471cea53a42156aeac2f44..2f4922a7b76c23ae31f91abedd646af892c1143e 100644 (file)
@@ -53,7 +53,7 @@ CFLAGS        += -fPIC -D_FILE_OFFSET_BITS=64
 
 define STAGE_PREPARE_CMDS
        cd $(DIR_APP) && sed -i 's@\(ln -s -f \)\$$(PREFIX)/bin/@\1@' Makefile
-       cd $(DIR_APP) && sed -e "s/$$(CC) -shared/& $(CFLAGS)/" -i Makefile-libbz2_so
+       cd $(DIR_APP) && sed -e "s/\$$(CC) -shared/& $(CFLAGS)/" -i Makefile-libbz2_so
 endef
 
 define STAGE_BUILD
index 6f18cd17073f2295e673ba4fddb1e5de4458fed0..974b0aeead7e606e40b14f74aae9dc5166e24504 100644 (file)
@@ -182,7 +182,6 @@ define STAGE_BUILD
                CFLAGS= \
                CXXFLAGS= \
                ../$(THISAPP)/configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=/usr \
                        --libexecdir=/usr/lib/glibc \
                        --disable-profile \
@@ -214,6 +213,12 @@ define STAGE_BUILD
                CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)"
 endef
 
+define STAGE_TEST
+       cd $(DIR_SRC)/glibc-build && cp -vf ../$(THISAPP)/iconvdata/gconv-modules iconvdata
+       cd $(DIR_SRC)/glibc-build && make -k check 2>&1 | tee glibc-check-log
+       cd $(DIR_SRC)/glibc-build && grep Error glibc-check-log
+endef
+
 define STAGE_INSTALL
        cd $(DIR_SRC)/glibc-build && make install install_root=$(BUILDROOT)
 
index ee45dd63abbaf16b3ca7055610092d365089d612..bc72fc8e86fa1042dedf43c8399cbd4aa2d2fd9c 100644 (file)
@@ -6,7 +6,6 @@ include ../../core/acl/acl.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make LIBTOOL="libtool --tag=CC" #$(PARALLELISMFLAGS)
index aa4a3ec1843c2ca02aff8d3d1ba9ab58c2cb550d..f44be23d3332923b7a76498ce3291f9b73f42be1 100644 (file)
@@ -6,7 +6,6 @@ include ../../core/attr/attr.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --enable-shared
 
diff --git a/pkgs/toolchain/autoconf/autoconf.nm b/pkgs/toolchain/autoconf/autoconf.nm
deleted file mode 100644 (file)
index fb7167d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-PKG_TOOLCHAIN_DEPS += gcc perl
-
-include ../../core/autoconf/autoconf.nm
-
-define STAGE_BUILD
-       cd $(DIR_APP) && \
-               ./configure \
-                       $(CONFIGURE_ARCH) \
-                       --prefix=$(TOOLS_DIR)
-
-       cd $(DIR_APP) && make $(PARALLELISMFLAGS)
-endef
diff --git a/pkgs/toolchain/automake/automake.nm b/pkgs/toolchain/automake/automake.nm
deleted file mode 100644 (file)
index 573025f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-PKG_TOOLCHAIN_DEPS += autoconf gcc glibc perl
-
-include ../../core/automake/automake.nm
-
-define STAGE_BUILD
-       cd $(DIR_APP) && \
-               ./configure \
-                       $(CONFIGURE_ARCH) \
-                       --prefix=$(TOOLS_DIR)
-
-       cd $(DIR_APP) && make $(PARALLELISMFLAGS)
-endef
index 5bf6c1e13ce673861ecf3597c4b842730be17ec6..f55e402f3c7b89c2a89c821d85fda636492d7709 100644 (file)
@@ -9,13 +9,17 @@ define STAGE_BUILD
        cd $(DIR_APP) && \
                ac_cv_func_working_mktime=yes \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --without-bash-malloc
 
        cd $(DIR_APP) && make #$(PARALLELISMFLAGS)
 endef
 
+# Test hangs forever
+#define STAGE_TEST
+#      cd $(DIR_APP) && make tests
+#endef
+
 define STAGE_INSTALL
        cd $(DIR_APP) && make install
 
index 57a5d3ec70a8b86f5eaa367de7e8ce9326a96087..b0a5cd3ef9a8fd08b2c7b6c38ad4bcec2f82c457 100644 (file)
@@ -1,21 +1,19 @@
 
-PKG_TOOLCHAIN_DEPS += kernel-headers
+PKG_TOOLCHAIN_DEPS = # No deps
 
 include ../../core/binutils/binutils.nm
 
 define STAGE_BUILD
        cd $(DIR_SRC)/binutils-build && \
-               CC="gcc -B/usr/bin/" \
                ../$(THISAPP)/configure \
-                       $(CONFIGURE_ARCH) \
                        --target=$(TARGET) \
                        --prefix=$(TOOLS_DIR) \
                        --disable-nls \
                        --disable-werror
 
-       cd $(DIR_SRC)/binutils-build && make tooldir=$(TOOLS_DIR) $(PARALLELISMFLAGS)
+       cd $(DIR_SRC)/binutils-build && make $(PARALLELISMFLAGS)
 endef
 
 define STAGE_INSTALL
-       cd $(DIR_SRC)/binutils-build && make tooldir=$(TOOLS_DIR) install
+       cd $(DIR_SRC)/binutils-build && make install
 endef
index 999cf2bc8776024eb262f4a61cb3dbdfec38e3fa..10b416acad36e79aaa67bd03d1f918de6042119c 100644 (file)
@@ -1,26 +1,28 @@
 
-PKG_TOOLCHAIN_DEPS += binutils-static glibc zlib
-
 include ../binutils-static/binutils-static.nm
 
+PKG_TOOLCHAIN_DEPS = glibc
+
 define STAGE_BUILD
        cd $(DIR_SRC)/binutils-build && \
+               AR=$(TARGET)-ar \
+               CC="$(TARGET)-gcc -B$(TOOLS_DIR)/lib/" \
+               RANLIB=$(TARGET)-ranlib \
                ../$(THISAPP)/configure \
                        $(CONFIGURE_ARCH) \
                        --target=$(TARGET) \
                        --prefix=$(TOOLS_DIR) \
                        --with-lib-path=$(TOOLS_DIR)/lib \
                        --disable-nls \
-                       --enable-shared \
                        --disable-werror
 
-       cd $(DIR_SRC)/binutils-build && make tooldir=$(TOOLS_DIR) $(PARALLELISMFLAGS)
+       cd $(DIR_SRC)/binutils-build && make $(PARALLELISMFLAGS)
 endef
 
 define STAGE_INSTALL
-       cd $(DIR_SRC)/binutils-build && make tooldir=$(TOOLS_DIR) install
+       cd $(DIR_SRC)/binutils-build && make install
 
        cd $(DIR_SRC)/binutils-build && make -C ld clean
        cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/lib:/usr/lib
-       cd $(DIR_SRC)/binutils-build && cp -v ld/.libs/ld-new $(TOOLS_DIR)/bin
+       cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new $(TOOLS_DIR)/bin
 endef
index ae8e70ac83c08c737842e8dde1c8d5ac768df50c..bef63e404a9d2c72c598b575c758c47e3c4b9b82 100644 (file)
@@ -3,6 +3,8 @@ PKG_TOOLCHAIN_DEPS += gcc glibc
 
 include ../../core/bzip2/bzip2.nm
 
+STAGE_PREPARE_CMDS =
+
 define STAGE_BUILD
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
index 2145c14bdd7a19c2f7bb0f6a06c0873be9a40a8b..f341605331108cc09c73cf549d52c3af3cc75915 100644 (file)
@@ -7,13 +7,17 @@ define STAGE_BUILD
        cd $(DIR_APP) && \
                gl_cv_func_printf_directive_n=no \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --enable-install-program=hostname
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
 
+# fails
+#define STAGE_TEST
+#      cd $(DIR_APP) && make RUN_EXPENSIVE_TESTS=yes check
+#endef
+
 define STAGE_INSTALL
        cd $(DIR_APP) && make install
 
index df28cd807e3aa2ed30552b79d16659eace4a46f8..01641a8e7cde8b64e4270b2ec2b28d981555bd73 100644 (file)
@@ -6,8 +6,11 @@ include ../../core/cpio/cpio.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
+
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
index a988e1e8c780a0393dffec9ba2fb9e9d52c8ddca..278d3bb3d4cd239ac447d55065eacc7e93a57d4d 100644 (file)
@@ -6,7 +6,6 @@ include ../../core/diffutils/diffutils.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
index f6e7db6b9f7809279c8813bf6aa65d7bcadfc276..176c0800805f759c04acc0ad421abf1949e28906 100644 (file)
@@ -6,13 +6,16 @@ include ../../core/file/file.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --disable-static
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
 
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
+
 define STAGE_INSTALL
        cd $(DIR_APP) && make install
 endef
index e72d1493892eaf2cb0f9ff28e16236e631846fa9..5a92e54fa67f9477b2b264c9f93d4ed48a51b0ca 100644 (file)
@@ -6,13 +6,13 @@ include ../../core/findutils/findutils.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --libexecdir=$(TOOLS_DIR)/lib/findutils
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
 
-define STAGE_INSTALL
-       cd $(DIR_APP) && make install
-endef
+# fails 
+#define STAGE_TEST
+#      cd $(DIR_APP) && make check
+#endef
index a0fc3ef69709e14d271d37cc641bec7917f12e07..26b4eaa5f733a87c26e16716f66c1633e6d8ae79 100644 (file)
@@ -7,12 +7,12 @@ define STAGE_BUILD
        cd $(DIR_APP) && \
                ac_cv_func_working_mktime=yes \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --libexecdir=$(TOOLS_DIR)/lib
 
-       cd $(DIR_APP) && echo "#define HAVE_LANGINFO_CODESET 1" >> config.h
-       cd $(DIR_APP) && echo "#define HAVE_LC_MESSAGES 1" >> config.h
-
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
+
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
index adc126f55b9ed8205404b32e5bb3959ab7b485ff..3932b252f6dddf9163672b6e434bc7d864434d99 100644 (file)
@@ -1,8 +1,22 @@
 
-PKG_TOOLCHAIN_DEPS += binutils-static kernel-headers
+PKG_TOOLCHAIN_DEPS += binutils-static
 
 include ../../core/gcc/gcc.nm
 
+GMP  = gmp-4.3.1
+MPFR = mpfr-2.4.1
+
+PKG_OBJECTS += $(GMP).tar.bz2 $(MPFR).tar.bz2
+
+define STAGE_PREPARE_CMDS
+       -mkdir -pv $(DIR_SRC)/gcc-build
+
+       cd $(DIR_APP) && $(DO_EXTRACT) $(DIR_DL)/$(GMP).tar.bz2
+       cd $(DIR_APP) && $(DO_EXTRACT) $(DIR_DL)/$(MPFR).tar.bz2
+       cd $(DIR_APP) && ln -svf $(GMP) gmp
+       cd $(DIR_APP) && ln -svf $(MPFR) mpfr
+endef
+
 define STAGE_BUILD
        ## Enable -fPIC by default
        cd $(DIR_APP) && sed 's/^\(#define CC1_SPEC.*\)\("\)$$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \
@@ -12,23 +26,22 @@ define STAGE_BUILD
 
        # libssp has no use with new versions of Glibc. Glibc completely replaces all 
        # functions in libssp, linking to libssp will cause conflicts with libc, so 
-       # libssp is a waste of space... so --disable-libssp. 
+       # libssp is a waste of space... so --disable-libssp.
 
        cd $(DIR_SRC)/gcc-build && \
-               CC="gcc -B/usr/bin/" \
                ../$(THISAPP)/configure \
-                       $(CONFIGURE_ARCH) \
                        --target=$(TARGET) \
                        $(CONFIG_CPU) \
                        --prefix=$(TOOLS_DIR) \
-                       --with-local-prefix=$(TOOLS_DIR) \
-                       --libexecdir=$(TOOLS_DIR)/lib \
+                       --disable-decimal-float \
+                       --disable-libgomp \
+                       --disable-libmudflap \
+                       --disable-libssp \
                        --enable-languages=c \
-                       --enable-shared \
+                       --disable-threads \
+                       --disable-multilib \
+                       --disable-shared \
                        --disable-nls \
-                       --disable-libssp \
-                       --disable-werror \
-                       --disable-static \
                        $(CONFIGURE_ARGS)
 
        cd $(DIR_SRC)/gcc-build && make $(PARALLELISMFLAGS)
@@ -37,9 +50,5 @@ endef
 define STAGE_INSTALL
        cd $(DIR_SRC)/gcc-build && make install
 
-       ln -fvs gcc $(TOOLS_DIR)/bin/cc
-
-       $(TARGET)-gcc -dumpspecs | sed \
-               -e 's@$(LINKER)@$(TOOLS_DIR)&@g' \
-               > $$(dirname $$($(TARGET)-gcc -print-libgcc-file-name))/specs
+       ln -svf libgcc.a $$($(TARGET)-gcc -print-libgcc-file-name | sed -e "s/libgcc/&_eh/")
 endef
index e160730e25205a8a2e794e8628fa67e2e9f557c1..40853789b64f54a4dd6d3d5ca81be8a0691f5a6a 100644 (file)
@@ -1,54 +1,45 @@
 
+include ../gcc-static/gcc-static.nm
+
 PKG_TOOLCHAIN_DEPS += binutils glibc
 
-include ../gcc-static/gcc-static.nm
+PKG_PATCHES    = $(THISAPP)-branch-startfiles-1.patch
+
+define STAGE_PREPARE_CMDS2
+       cd $(DIR_APP) && sed \
+               -e "s@\./fixinc\.sh@-c true@" \
+               -e "s/^T_CFLAGS =$$/& -fomit-frame-pointer/" \
+               -i gcc/Makefile.in
+
+       for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h); do \
+               sed -i $$file \
+                       -e "s@/lib\(64\)\?\(32\)\?/ld@$(TOOLS_DIR)&@g" \
+                       -e "s@/usr@$(TOOLS_DIR)@g"; \
+               cat include-append >> $$file; \
+       done
+endef
 
 define STAGE_BUILD
-       cd $(DIR_APP) && sed 's@\./fixinc\.sh@-c true@' -i gcc/Makefile.in
-       cd $(DIR_APP) && sed 's/^XCFLAGS =$$/& -fomit-frame-pointer/' -i gcc/Makefile.in
-       cd $(DIR_APP) && \
-               for file in $$(find gcc/config -name linux64.h -o -name linux.h); do \
-                       cp -uv $$file{,.orig}; \
-                       sed -e 's@/lib\(64\)\?\(32\)\?/ld@$(TOOLS_DIR)&@g' \
-                               -e 's@/usr@$(TOOLS_DIR)@g' $$file.orig > $$file; \
-                       echo -e "\n#undef STANDARD_INCLUDE_DIR\n#define STANDARD_INCLUDE_DIR 0" >> $$file; \
-                       touch $$file.orig; \
-               done
-
-#ifeq "$(MACHINE)" "x86_64"
-#      # Remove multilib options and searchpath (/lib... /usr/lib...)
-#      cd $(DIR_APP) && echo "" > gcc/config/i386/t-linux64
-#      ## Enable -fPIC by default (why i have to do this again ???)
-#      cd $(DIR_APP) && sed 's/^\(#define CC1_SPEC.*\)\("\)$$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \
-#              -i gcc/config/i386/x86-64.h
-#endif
-
-       # We need to do another bootstrap, so that everything in $(TOOLS_DIR) is hardened.
        cd $(DIR_SRC)/gcc-build && \
+               AR=$(TARGET)-ar \
+               CC="$(TARGET)-gcc -B$(TOOLS_DIR)/lib/" \
+               RANLIB=$(TARGET)-ranlib \
                ../$(THISAPP)/configure \
-                       $(CONFIGURE_ARCH) \
-                       --target=$(TARGET) \
-                       $(CONFIG_CPU) \
                        --prefix=$(TOOLS_DIR) \
                        --with-local-prefix=$(TOOLS_DIR) \
-                       --libexecdir=$(TOOLS_DIR)/lib \
-                       --enable-espf \
                        --enable-clocale=gnu \
                        --enable-shared \
                        --enable-threads=posix \
                        --enable-__cxa_atexit \
                        --enable-languages=c,c++ \
                        --disable-libstdcxx-pch \
-                       --disable-bootstrap \
-                       --disable-werror \
-                       --disable-libssp \
-                       --disable-nls \
-                       --disable-static \
-                       $(CONFIGURE_ARGS)
+                       --disable-multilib \
+                       --disable-bootstrap
 
        cd $(DIR_SRC)/gcc-build && make $(PARALLELISMFLAGS)
 endef
 
 define STAGE_INSTALL
        cd $(DIR_SRC)/gcc-build && make install
+       ln -svf gcc $(TOOLS_DIR)/bin/cc
 endef
diff --git a/pkgs/toolchain/gcc/include-append b/pkgs/toolchain/gcc/include-append
new file mode 100644 (file)
index 0000000..1d5c265
--- /dev/null
@@ -0,0 +1,5 @@
+
+#undef STANDARD_INCLUDE_DIR
+#define STANDARD_INCLUDE_DIR 0
+#define STANDARD_STARTFILE_PREFIX_1 ""
+#define STANDARD_STARTFILE_PREFIX_2 ""
index 5470796b70a02680df290484e4a231429181dbb6..5d3caa9eb3c532ef930b92408c38effa7585e1ef 100644 (file)
@@ -6,7 +6,6 @@ include ../../core/gettext/gettext.nm
 define STAGE_BUILD
        cd $(DIR_APP)/gettext-tools && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --disable-shared
 
index 9454801a324594beb14f0ae59b6ac53f7a0b6c6a..27781226fb81e966a18c6681854af6d5df90924f 100644 (file)
@@ -4,44 +4,22 @@ PKG_TOOLCHAIN_DEPS += binutils-static gcc-static kernel-headers
 include ../../core/glibc/glibc.nm
 
 define STAGE_BUILD
-       # Glibc uses a hard coded path for /etc/ld.so.preload. To keep Glibc from
-       # preloading libraries from the host machine perform the following command:
-       cd $(DIR_APP) && sed -e "s@/etc/ld.so.preload@$(TOOLS_DIR)@" -i elf/rtld.c
-
        cd $(DIR_SRC)/glibc-build && \
                CFLAGS= \
                CXXFLAGS= \
+               libc_cv_c_cleanup=yes \
+               libc_cv_forced_unwind=yes \
                ../$(THISAPP)/configure \
-                       $(CONFIGURE_ARCH) \
+                       --host=$(TARGET) \
+                       --build=$$(../$(THISAPP)/scripts/config.guess) \
                        --prefix=$(TOOLS_DIR) \
                        --libexecdir=$(TOOLS_DIR)/lib/$(PKG_NAME) \
                        --with-headers=$(TOOLS_DIR)/include \
-                       --with-binutils=$(TOOLS_DIR)/bin \
                        --disable-profile \
                        --enable-add-ons \
-                       --enable-kernel=$(OPTIMIZED_KERNEL) \
-                       --without-selinux \
-                       --without-gd \
-                       --enable-bind-now \
-                       --enable-stackguard-randomization
-
-       # Our GCC is already passing -fPIC, and that's all we want for the libraries.
-       # LDFLAGS.so is appended to so we don't build shared libraries with
-       # DT_TEXTREL (and to tell us if something goes wrong). For now we only build
-       # the libraries, not the programs:
-       echo "build-programs=no" \
-               >> $(DIR_SRC)/glibc-build/configparms
+                       --enable-kernel=$(OPTIMIZED_KERNEL)
 
-       cd $(DIR_SRC)/glibc-build && make PARALLELMFLAGS=$(PARALLELISMFLAGS) \
-               CFLAGS="-O2 -DPIC -fno-stack-protector -U_FORTIFY_SOURCE" \
-               CXXFLAGS="-O2 -DPIC -fno-stack-protector -U_FORTIFY_SOURCE"
-
-       # Then build the programs with hardening, so everything possible in
-       # $(TOOLS_DIR) is hardened:
-       echo "CFLAGS   = $(CFLAGS)"   >  $(DIR_SRC)/glibc-build/configparms
-       echo "CXXFLAGS = $(CXXFLAGS)" >> $(DIR_SRC)/glibc-build/configparms
-       cd $(DIR_SRC)/glibc-build && make PARALLELMFLAGS=$(PARALLELISMFLAGS) \
-               CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)"
+       cd $(DIR_SRC)/glibc-build && make PARALLELMFLAGS=$(PARALLELISMFLAGS)
 endef
 
 define STAGE_INSTALL
@@ -49,4 +27,9 @@ define STAGE_INSTALL
        touch $(TOOLS_DIR)/etc/ld.so.conf
 
        cd $(DIR_SRC)/glibc-build && make install
+
+       $(TARGET)-gcc -dumpspecs | \
+               sed -e "s@/lib\(64\)\?/ld@$(TOOLS_DIR)&@g" \
+                       -e "/^\*cpp:$$/{n;s,$$, -isystem $(TOOLS_DIR)/include,}" > \
+               $$(dirname $$($(TARGET)-gcc -print-libgcc-file-name))/specs
 endef
index cbc117e72a29a96083907ff0bd4a4eeb745e25e0..21ce377237857c253dafede8e84e78f870e99a00 100644 (file)
@@ -6,10 +6,13 @@ include ../../core/grep/grep.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --disable-perl-regexp \
                        --without-included-regex
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
+
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
index 93ef9ac9e3d91e427d740b1b1fd7886bea5d0d9c..c2089bc94ec003030c5ac39e653933f2abb2a77b 100644 (file)
@@ -9,12 +9,15 @@ define STAGE_BUILD
                DEFS=NO_ASM \
                CPPFLAGS="-DHAVE_LSTAT" \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
 
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
+
 define STAGE_INSTALL
        cd $(DIR_APP) && make install
 endef
index 191f38a17d00518ba6463defdf7174806bce1e05..edf9743a951e6df8902b978bc9d7d3715b1eb6ce 100644 (file)
@@ -1,5 +1,5 @@
 
-PKG_TOOLCHAIN_DEPS = # Depends on nothing
+PKG_TOOLCHAIN_DEPS = gcc-static
 
 include ../../core/kernel-headers/kernel-headers.nm
 
index 602a9c0a18189af1cd07862bece933800acc22ca..f1029f97e91ba9b3a61d638592e4299e008cc7da 100644 (file)
@@ -8,8 +8,12 @@ define STAGE_BUILD
                CPPFLAGS="-D_GNU_SOURCE" \
                gl_cv_func_printf_directive_n=no \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
+
+# fails
+#define STAGE_TEST
+#      cd $(DIR_APP) && make check
+#endef
index 16551bad2e480ec274e96f3b30d757b2010db77b..49b08c7ab5f7c83933a96b1e96cf5515a8cd25f4 100644 (file)
@@ -6,8 +6,11 @@ include ../../core/make/make.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
+
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
index a84a008d7223f9f4a4712349375242258c90a41f..9266cc7224e8994e4b3b23df60a3315704e2cc54 100644 (file)
@@ -6,17 +6,13 @@ include ../../core/ncurses/ncurses.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --with-shared \
                        --without-debug \
                        --without-ada \
                        --enable-overwrite \
                        --enable-widec \
-                       --without-cxx-binding \
-                       --enable-symlinks \
-                       --disable-root-environ \
-                       --disable-static
+                       --enable-symlinks
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
index e406c53b520e03ea3561121dd8c985b7335f95af..86886f242016405efbbc1be26ac2489d26700705 100644 (file)
@@ -6,12 +6,15 @@ include ../../core/patch/patch.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
 
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
+
 define STAGE_INSTALL
        cd $(DIR_APP) && make install
 endef
index 49d89b169b7f47d5c4d8e16b09b1a5698828dd7e..9ca0313c46b3b642284904cbb057f590837aeb23 100644 (file)
@@ -3,6 +3,10 @@ PKG_TOOLCHAIN_DEPS += gcc glibc
 
 include ../../core/perl/perl.nm
 
+PKG_PATCHES = $(THISAPP)-libc-1.patch
+
+STAGE_PREPARE_CMDS =
+
 define STAGE_BUILD
        -mkdir -pv $(DIR_SRC)/perl-build
 
@@ -15,19 +19,16 @@ define STAGE_BUILD
        # be interactive.
        cd $(DIR_SRC)/perl-build && \
                $(DIR_APP)/Configure \
-                       -Dcc=$(TARGET)-gcc \
                        -Dprefix=$(TOOLS_DIR) \
-                       -Dlibc=$(shell ls $(TOOLS_DIR)/lib/libc-*.so) \
-                       -Ulocincpth \
-                       -Uloclibpth \
-                       -Dglibpth="$(TOOLS_DIR)/lib" \
-                       -Dusrinc="$(TOOLS_DIR)/include" \
+                       -Dstatic_ext="Data/Dumper Fcntl IO POSIX" \
                        -Dmksymlinks \
-                       -d -e
+                       -d -e -s
 
-       cd $(DIR_SRC)/perl-build && make #$(PARALLELISMFLAGS)
+       cd $(DIR_SRC)/perl-build && make perl utilities ext/Errno/pm_to_blib #$(PARALLELISMFLAGS)
 endef
 
 define STAGE_INSTALL
-       cd $(DIR_SRC)/perl-build && make LNS="cp" install
+       cd $(DIR_SRC)/perl-build && cp -vf perl pod/pod2man $(TOOLS_DIR)/bin/
+       -mkdir -pv $(TOOLS_DIR)/lib/perl5/$(PKG_VER)
+       cd $(DIR_APP) && cp -Rvf lib/* $(TOOLS_DIR)/lib/perl5/$(PKG_VER)
 endef
index fc57b5a1e0854b800fffcc00e993121a7ce82ffc..38782419086fd3534f5834ab4537b90261e64f97 100644 (file)
@@ -6,9 +6,12 @@ include ../../core/sed/sed.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --without-included-regex
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
+
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
index 99cdc998baf9f0488c03bd33a51917c8891224a6..da1addc61cfa9a952161d3ee3de7450ef6153af6 100644 (file)
@@ -1,15 +1,17 @@
 
-PKG_TOOLCHAIN_DEPS += gcc glibc
+PKG_TOOLCHAIN_DEPS += acl attr gcc glibc
 
 include ../../core/tar/tar.nm
 
 define STAGE_BUILD
-       # Normally the 'rmt' programs goes in sbin/.
-       cd $(DIR_APP) && LDFLAGS="-z muldefs" \
+       cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
-                       --prefix=$(TOOLS_DIR) \
-                       --libexecdir=$(TOOLS_DIR)/bin
+                       --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
+
+# fails
+#define STAGE_TEST
+#      cd $(DIR_APP) && make check
+#endef
index 675a6419cd39a4ab50410a65739b5da0d6ef8617..fb942539d74b2b91857fa695474ed970c13fad87 100644 (file)
@@ -5,10 +5,12 @@ include ../../core/texinfo/texinfo.nm
 
 define STAGE_BUILD
        cd $(DIR_APP) && \
-               LDFLAGS="-lncursesw" \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR)
 
        cd $(DIR_APP) && make $(PARALLELISMFLAGS)
 endef
+
+define STAGE_TEST
+       cd $(DIR_APP) && make check
+endef
index 68cac4ea50d719ff4e4d0ecdb3cf838cc00ee0ea..2044d2a83979fc61d6db89b211dc4c0f695dda01 100644 (file)
@@ -6,7 +6,6 @@ include ../../core/xz/xz.nm
 define STAGE_BUILD
        cd $(DIR_APP) && \
                ./configure \
-                       $(CONFIGURE_ARCH) \
                        --prefix=$(TOOLS_DIR) \
                        --disable-static
 
diff --git a/pkgs/toolchain/zlib/zlib.nm b/pkgs/toolchain/zlib/zlib.nm
deleted file mode 100644 (file)
index fb347fc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-PKG_TOOLCHAIN_DEPS += glibc
-
-include ../../core/zlib/zlib.nm
-
-define STAGE_BUILD
-       cd $(DIR_APP) && sed -e "s/^AC_PROG_CXX$$//g" -i configure.ac
-       cd $(DIR_APP) && autoreconf --install --force
-       cd $(DIR_APP) && \
-               ac_cv_func_working_mktime=yes \
-               ./configure \
-                       $(CONFIGURE_ARCH) \
-                       --prefix=$(TOOLS_DIR) \
-                       --disable-static
-
-       cd $(DIR_APP) && make $(PARALLELISMFLAGS)
-endef
-
-define STAGE_INSTALL
-       cd $(DIR_APP) && make install
-endef