From: Michael Tremer Date: Sat, 9 Jan 2010 15:28:10 +0000 (+0100) Subject: naoki: Add toolchain features. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6ca51785309dda9c79de5c72fedade9bb62d98c;p=ipfire-3.x.git naoki: Add toolchain features. Fixes lot of things in the toolchain, etc. Adding testsuites. --- diff --git a/make.sh b/make.sh index cddabc74d..1e898d01d 100755 --- 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") diff --git a/naoki/__init__.py b/naoki/__init__.py index 43a256d7e..27621f2d2 100644 --- a/naoki/__init__.py +++ b/naoki/__init__.py @@ -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) diff --git a/naoki/chroot.py b/naoki/chroot.py index 8697c65ca..c57d38857 100644 --- a/naoki/chroot.py +++ b/naoki/chroot.py @@ -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", diff --git a/naoki/constants.py b/naoki/constants.py index a0f1ec944..4493c8b21 100644 --- a/naoki/constants.py +++ b/naoki/constants.py @@ -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"], diff --git a/naoki/package.py b/naoki/package.py index beb991d0e..2d029580c 100644 --- a/naoki/package.py +++ b/naoki/package.py @@ -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) diff --git a/pkgs/Include b/pkgs/Include index c449892b7..0e21eb4e0 100644 --- a/pkgs/Include +++ b/pkgs/Include @@ -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 $@ diff --git a/pkgs/core/bzip2/bzip2.nm b/pkgs/core/bzip2/bzip2.nm index a6f232757..2f4922a7b 100644 --- a/pkgs/core/bzip2/bzip2.nm +++ b/pkgs/core/bzip2/bzip2.nm @@ -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 diff --git a/pkgs/core/glibc/glibc.nm b/pkgs/core/glibc/glibc.nm index 6f18cd170..974b0aeea 100644 --- a/pkgs/core/glibc/glibc.nm +++ b/pkgs/core/glibc/glibc.nm @@ -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) diff --git a/pkgs/toolchain/acl/acl.nm b/pkgs/toolchain/acl/acl.nm index ee45dd63a..bc72fc8e8 100644 --- a/pkgs/toolchain/acl/acl.nm +++ b/pkgs/toolchain/acl/acl.nm @@ -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) diff --git a/pkgs/toolchain/attr/attr.nm b/pkgs/toolchain/attr/attr.nm index aa4a3ec18..f44be23d3 100644 --- a/pkgs/toolchain/attr/attr.nm +++ b/pkgs/toolchain/attr/attr.nm @@ -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 index fb7167dc1..000000000 --- a/pkgs/toolchain/autoconf/autoconf.nm +++ /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 index 573025f44..000000000 --- a/pkgs/toolchain/automake/automake.nm +++ /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 diff --git a/pkgs/toolchain/bash/bash.nm b/pkgs/toolchain/bash/bash.nm index 5bf6c1e13..f55e402f3 100644 --- a/pkgs/toolchain/bash/bash.nm +++ b/pkgs/toolchain/bash/bash.nm @@ -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 diff --git a/pkgs/toolchain/binutils-static/binutils-static.nm b/pkgs/toolchain/binutils-static/binutils-static.nm index 57a5d3ec7..b0a5cd3ef 100644 --- a/pkgs/toolchain/binutils-static/binutils-static.nm +++ b/pkgs/toolchain/binutils-static/binutils-static.nm @@ -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 diff --git a/pkgs/toolchain/binutils/binutils.nm b/pkgs/toolchain/binutils/binutils.nm index 999cf2bc8..10b416aca 100644 --- a/pkgs/toolchain/binutils/binutils.nm +++ b/pkgs/toolchain/binutils/binutils.nm @@ -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 diff --git a/pkgs/toolchain/bzip2/bzip2.nm b/pkgs/toolchain/bzip2/bzip2.nm index ae8e70ac8..bef63e404 100644 --- a/pkgs/toolchain/bzip2/bzip2.nm +++ b/pkgs/toolchain/bzip2/bzip2.nm @@ -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 diff --git a/pkgs/toolchain/coreutils/coreutils.nm b/pkgs/toolchain/coreutils/coreutils.nm index 2145c14bd..f34160533 100644 --- a/pkgs/toolchain/coreutils/coreutils.nm +++ b/pkgs/toolchain/coreutils/coreutils.nm @@ -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 diff --git a/pkgs/toolchain/cpio/cpio.nm b/pkgs/toolchain/cpio/cpio.nm index df28cd807..01641a8e7 100644 --- a/pkgs/toolchain/cpio/cpio.nm +++ b/pkgs/toolchain/cpio/cpio.nm @@ -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 diff --git a/pkgs/toolchain/diffutils/diffutils.nm b/pkgs/toolchain/diffutils/diffutils.nm index a988e1e8c..278d3bb3d 100644 --- a/pkgs/toolchain/diffutils/diffutils.nm +++ b/pkgs/toolchain/diffutils/diffutils.nm @@ -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) diff --git a/pkgs/toolchain/file/file.nm b/pkgs/toolchain/file/file.nm index f6e7db6b9..176c08008 100644 --- a/pkgs/toolchain/file/file.nm +++ b/pkgs/toolchain/file/file.nm @@ -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 diff --git a/pkgs/toolchain/findutils/findutils.nm b/pkgs/toolchain/findutils/findutils.nm index e72d14938..5a92e54fa 100644 --- a/pkgs/toolchain/findutils/findutils.nm +++ b/pkgs/toolchain/findutils/findutils.nm @@ -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 diff --git a/pkgs/toolchain/gawk/gawk.nm b/pkgs/toolchain/gawk/gawk.nm index a0fc3ef69..26b4eaa5f 100644 --- a/pkgs/toolchain/gawk/gawk.nm +++ b/pkgs/toolchain/gawk/gawk.nm @@ -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 diff --git a/pkgs/toolchain/gcc-static/gcc-static.nm b/pkgs/toolchain/gcc-static/gcc-static.nm index adc126f55..3932b252f 100644 --- a/pkgs/toolchain/gcc-static/gcc-static.nm +++ b/pkgs/toolchain/gcc-static/gcc-static.nm @@ -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 diff --git a/pkgs/toolchain/gcc/gcc.nm b/pkgs/toolchain/gcc/gcc.nm index e160730e2..40853789b 100644 --- a/pkgs/toolchain/gcc/gcc.nm +++ b/pkgs/toolchain/gcc/gcc.nm @@ -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 index 000000000..1d5c2657a --- /dev/null +++ b/pkgs/toolchain/gcc/include-append @@ -0,0 +1,5 @@ + +#undef STANDARD_INCLUDE_DIR +#define STANDARD_INCLUDE_DIR 0 +#define STANDARD_STARTFILE_PREFIX_1 "" +#define STANDARD_STARTFILE_PREFIX_2 "" diff --git a/pkgs/toolchain/gettext/gettext.nm b/pkgs/toolchain/gettext/gettext.nm index 5470796b7..5d3caa9eb 100644 --- a/pkgs/toolchain/gettext/gettext.nm +++ b/pkgs/toolchain/gettext/gettext.nm @@ -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 diff --git a/pkgs/toolchain/glibc/glibc.nm b/pkgs/toolchain/glibc/glibc.nm index 9454801a3..27781226f 100644 --- a/pkgs/toolchain/glibc/glibc.nm +++ b/pkgs/toolchain/glibc/glibc.nm @@ -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 diff --git a/pkgs/toolchain/grep/grep.nm b/pkgs/toolchain/grep/grep.nm index cbc117e72..21ce37723 100644 --- a/pkgs/toolchain/grep/grep.nm +++ b/pkgs/toolchain/grep/grep.nm @@ -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 diff --git a/pkgs/toolchain/gzip/gzip.nm b/pkgs/toolchain/gzip/gzip.nm index 93ef9ac9e..c2089bc94 100644 --- a/pkgs/toolchain/gzip/gzip.nm +++ b/pkgs/toolchain/gzip/gzip.nm @@ -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 diff --git a/pkgs/toolchain/kernel-headers/kernel-headers.nm b/pkgs/toolchain/kernel-headers/kernel-headers.nm index 191f38a17..edf9743a9 100644 --- a/pkgs/toolchain/kernel-headers/kernel-headers.nm +++ b/pkgs/toolchain/kernel-headers/kernel-headers.nm @@ -1,5 +1,5 @@ -PKG_TOOLCHAIN_DEPS = # Depends on nothing +PKG_TOOLCHAIN_DEPS = gcc-static include ../../core/kernel-headers/kernel-headers.nm diff --git a/pkgs/toolchain/m4/m4.nm b/pkgs/toolchain/m4/m4.nm index 602a9c0a1..f1029f97e 100644 --- a/pkgs/toolchain/m4/m4.nm +++ b/pkgs/toolchain/m4/m4.nm @@ -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 diff --git a/pkgs/toolchain/make/make.nm b/pkgs/toolchain/make/make.nm index 16551bad2..49b08c7ab 100644 --- a/pkgs/toolchain/make/make.nm +++ b/pkgs/toolchain/make/make.nm @@ -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 diff --git a/pkgs/toolchain/ncurses/ncurses.nm b/pkgs/toolchain/ncurses/ncurses.nm index a84a008d7..9266cc722 100644 --- a/pkgs/toolchain/ncurses/ncurses.nm +++ b/pkgs/toolchain/ncurses/ncurses.nm @@ -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 diff --git a/pkgs/toolchain/patch/patch.nm b/pkgs/toolchain/patch/patch.nm index e406c53b5..86886f242 100644 --- a/pkgs/toolchain/patch/patch.nm +++ b/pkgs/toolchain/patch/patch.nm @@ -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 diff --git a/pkgs/toolchain/perl/perl.nm b/pkgs/toolchain/perl/perl.nm index 49d89b169..9ca0313c4 100644 --- a/pkgs/toolchain/perl/perl.nm +++ b/pkgs/toolchain/perl/perl.nm @@ -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 diff --git a/pkgs/toolchain/sed/sed.nm b/pkgs/toolchain/sed/sed.nm index fc57b5a1e..387824190 100644 --- a/pkgs/toolchain/sed/sed.nm +++ b/pkgs/toolchain/sed/sed.nm @@ -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 diff --git a/pkgs/toolchain/tar/tar.nm b/pkgs/toolchain/tar/tar.nm index 99cdc998b..da1addc61 100644 --- a/pkgs/toolchain/tar/tar.nm +++ b/pkgs/toolchain/tar/tar.nm @@ -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 diff --git a/pkgs/toolchain/texinfo/texinfo.nm b/pkgs/toolchain/texinfo/texinfo.nm index 675a6419c..fb942539d 100644 --- a/pkgs/toolchain/texinfo/texinfo.nm +++ b/pkgs/toolchain/texinfo/texinfo.nm @@ -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 diff --git a/pkgs/toolchain/xz/xz.nm b/pkgs/toolchain/xz/xz.nm index 68cac4ea5..2044d2a83 100644 --- a/pkgs/toolchain/xz/xz.nm +++ b/pkgs/toolchain/xz/xz.nm @@ -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 index fb347fceb..000000000 --- a/pkgs/toolchain/zlib/zlib.nm +++ /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