Skip to content
Snippets Groups Projects
  1. Jan 24, 2022
    • Felix Fietkau's avatar
      build: change PYTHON to python3 · f8bc8fa3
      Felix Fietkau authored
      
      On recent macOS, /usr/bin/python3 is a wrapper that finds the right python executable
      It checks argv[0] to determine if python2 or python3 should be called. Always execute
      it as python3 to ensure it calls the right version
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      f8bc8fa3
  2. Jan 16, 2022
  3. Sep 19, 2021
  4. Jun 12, 2021
  5. May 13, 2021
    • Leonardo Mörlein's avatar
      build: introduce $(MKHASH) · b993b68b
      Leonardo Mörlein authored
      
      Before this commit, it was assumed that mkhash is in the PATH. While
      this was fine for the normal build workflow, this led to some issues if
      
          make TOPDIR="$(pwd)" -C "$pkgdir" compile
      
      was called manually. In most of the cases, I just saw warnings like this:
      
          make: Entering directory '/home/.../package/gluon-status-page'
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          [...]
      
      While these were only warnings and the package still compiled sucessfully,
      I also observed that some package even fail to build because of this.
      
      After applying this commit, the variable $(MKHASH) is introduced. This
      variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the
      correct path.
      
      Signed-off-by: default avatarLeonardo Mörlein <me@irrelefant.net>
      b993b68b
  6. Mar 24, 2021
    • Philip Prindeville's avatar
      build: make sure asm gets built with -DPIC · af22991e
      Philip Prindeville authored
      
      Fixes issue openwrt/packages#14921, whereby inline ASM wasn't getting
      built as PIC; look at gmp-6.2.1/mpn/x86/pentium/popcount.asm for
      example:
      
      ifdef(`PIC',`
      ...
      
      for a routine that exists in both PIC and non-PIC versions.
      
      Make sure that wherever $(FPIC) gets passed as a variable expansion
      that it gets quoted where necessary (such as setting environment
      variables in shell commands).
      
      Signed-off-by: default avatarPhilip Prindeville <philipp@redfish-solutions.com>
      af22991e
  7. Feb 15, 2021
  8. Feb 14, 2021
    • Felix Fietkau's avatar
      build: add support for fixing up library soname · b12288fa
      Felix Fietkau authored
      
      This makes it possible to declare a package ABI_VERSION independent from the
      upstream soname by setting PKG_ABI_VERSION in the package makefile.
      The library filename is fixed up for files installed to packages and to the
      staging dir. References to the original from executables within the same
      package are also fixed up
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      b12288fa
  9. Feb 05, 2021
  10. Jan 30, 2021
  11. Jan 27, 2021
    • Paul Spooren's avatar
      rules: fix COMMITCOUNT logic · 513f7171
      Paul Spooren authored
      
      The newly added $(COMMITCOUNT) variable was wrongly increased by plus
      one. The addition should have been only added to $(AUTORELEASE) as
      OpenWrt traditionally starts counting at one rather than zero.
      
      $(AUTORELEASE) counts the commits since the last bump, which is zero on
      the version bump commit itself.
      
      This commit increases $(AUTORELEASE) by one while leaving $(COMMITCOUNT)
      as is.
      
      The base-files package is the only package using $(COMMITCOUNT) so far
      and requires a pseudo commit to keep the PKG_RELEASE correct. A non
      functional change (Copyright bump) is done in the next commit.
      
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      513f7171
  12. Jan 23, 2021
    • Paul Spooren's avatar
      rules: add AUTORELEASE and COMMITCOUNT variables · 9ae3c6f9
      Paul Spooren authored
      
      The lack of bumped PKG_RELEASE variables is a recurring theme on the
      mailing list and in GitHub comments. This costs precious review time,
      a rare good within the OpenWrt project.
      
      Instead of relying on a manually set PKG_RELEASE this commit adds a
      `commitcount` function that uses the number of Git commits to determine
      the release. The function is called via the variables `$(AUTORELEASE)`
      or `$(COMMITCOUNT)`. The `PKG_RELEASE` variable can be set to either of
      the two.
      
      - $(AUTORELEASE):
      
      Release is automagically set to the number of commits since the last
      commit containing either ": update to " or ": bump to ".
      
      Example below:
      
          $ git log packages/foobar/
          foobar: fixup file location
          foobar: disable docs
          foobar: bump to 5.3.2
          foobar: fixup copyright
      
      Resulting package name: foobar_5.3.2-3_all.ipk, two package changes
      since the last upstream version change, using a 1 based counter.
      
      - $(COMMITCOUNT):
      
      For non-traditional versioning (x.y.z), most prominent `base-files`,
      this variable contains the total number of package commits.
      
      The new functionality can also be used by other feeds like packages.git.
      
      In case no build information is available, e.g. when using release
      tarballs, the SOURCE_DATE_EPOCH is used to have a reproducible release
      identifier.
      
      Suggested-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      9ae3c6f9
  13. Dec 07, 2020
    • Stijn Tintel's avatar
      rules.mk: use -fPIC instead of -fpic on arm64 · 0eb2fa39
      Stijn Tintel authored
      
      Some packages fail to build on arm64 when PKG_ASLR_PIE_ALL=y, due to
      machine-specific size restrictions on the global offset table.
      While the manual instructs to recompile with -fPIC if it fails with
      -fpic, by doing this per package, there is still a risk of random
      breakage due to version bumps or other changes, so let's use -fPIC on
      arm64 by default.
      
      While comparing the sizes of 141 packages built with -fpic vs -fPIC,
      most packages are either equal or smaller in size. Only 9 of the
      compared packages turned out slightly larger.
      
      Signed-off-by: default avatarStijn Tintel <stijn@linux-ipv6.be>
      0eb2fa39
  14. Nov 28, 2020
  15. Nov 27, 2020
  16. Nov 26, 2020
    • Rui Salvaterra's avatar
      tools/sstrip: update to latest version · 3f567d84
      Rui Salvaterra authored
      
      Drop our local sstrip copy and use the current ELFKickers upstream
      version.
      
      Patch the original makefile in order to avoid building elftoc, since it
      fails with musl's elf.h. This is fine, since we only need sstrip anyway.
      
      Finally, add the possibility to pass additional arguments to sstrip and
      pass -z (remove trailing zeros) by default, which matches the behaviour
      of the previous version.
      
      Signed-off-by: default avatarRui Salvaterra <rsalvaterra@gmail.com>
      [shorten long commit msg lines]
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      3f567d84
  17. Oct 30, 2020
  18. Sep 01, 2020
  19. Aug 10, 2020
  20. Aug 06, 2020
    • Felix Fietkau's avatar
      build: make prefix mapping of debug information optional · eb155f75
      Felix Fietkau authored
      
      Remapping the local build path in debug information makes debugging
      using ./scripts/remote-gdb harder, because files no longer refer to the full
      path on the build host.
      
      For local builds, debug information does not need to be reproducible,
      since it will be stripped out of packages anyway.
      
      For buildbot builds, it makes sense to keep debug information reproducible,
      since the full path is not needed (nor desired) anywhere.
      
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      eb155f75
  21. Jul 11, 2020
    • Roman Yeryomin's avatar
      build: improve ccache support · 2ca084cc
      Roman Yeryomin authored
      
      Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR).
      This allows to do clean and dirclean. Cache hit rate for test build
      after dirclean is ~65%.
      If CCACHE is enabled stats are printed out at the end of building process.
      CCACHE_DIR config variable allows to override default, which could be useful
      when sharing cache with many builds.
      cacheclean make target allows to clean the cache.
      
      Changes from v1:
      - remove ccache directory using CCACHE_DIR variable
      - remove ccache leftovers from sdk and toolchain make files
      - introduce CONFIG_CCACHE_DIR variable
      - introduce cacheclean make target
      
      Signed-off-by: default avatarRoman Yeryomin <roman@advem.lv>
      2ca084cc
  22. Nov 02, 2019
    • Sebastian Kemper's avatar
      rules.mk: remove "$(STAGING_DIR)/include" · 1f0063b5
      Sebastian Kemper authored
      "$(STAGING_DIR)/include" was carried over from buildroot-ng to OpenWrt
      in commit 60c1f0f6. buildroot has
      dropped this directory a long time ago.
      
      In OpenWrt the directory is still created by the PrepareStaging macro
      and is part of the default TARGET_CPPFLAGS. But nothing at all installs
      headers into this directory, nor should anything be installed under this
      path.
      
      Removing this directory from TARGET_CPPFLAGS will cut down the log noise
      a bit. Not only will CPPFLAGS be shorter, there will be less warnings
      set off by "-Wmissing-include-dirs" (or even failures when paired with
      "-Werror"). After all the directory does not even _exist_ in the SDKs,
      which are used on the build bots when building packages (see [1] and
      [2]).
      
      make[8]: Entering directory '/builder/shared-workdir/build/sdk/build_dir/target-aarch64_generic_musl/libmbim-1.20.0/src/common'
        CC       libmbim_common_la-mbim-common.lo
      cc1: error: /builder/shared-workdir/build/sdk/staging_dir/target-aarch64_generic_musl/include: No such file or directory [-Werror=missing-include-dirs]
      cc1: all warnings being treated as errors
      
      [1] https://github.com/openwrt/packages/issues/10377
      [2] https://github.com/openwrt/packages/pull/10378
      
      
      
      Signed-off-by: default avatarSebastian Kemper <sebastian_ml@gmx.net>
      Acked-by: default avatarJo-Philipp Wich <jo@mein.io>
      Acked-by: default avatarRosen Penev <rosenp@gmail.com>
      1f0063b5
  23. Oct 09, 2019
  24. Sep 28, 2019
  25. Jan 22, 2019
  26. Nov 29, 2018
  27. Sep 24, 2018
  28. Aug 20, 2018
  29. Jul 22, 2018
  30. Jun 27, 2018
  31. Mar 07, 2018
  32. Jan 26, 2018
    • Alexandru Ardelean's avatar
      rules.mk: drop `include_mk` build rule · cfdfa6d0
      Alexandru Ardelean authored and Matthias Schiffer's avatar Matthias Schiffer committed
      
      The only users of this were the python packages
      from the `packages` feed.
      The 2 python interpreters would export some mk
      files (e.g. python-package.mk) and then other
      python packages would include it via this rule.
      
      But there's a few things wrong with this approach,
      most of them drawing from the fact that python host
      needs to be built first, to export these mk files.
      
      By now all uses of include_mk have been corrected
      in the feeds and this can be removed.
      
      Signed-off-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
      cfdfa6d0
  33. Jan 17, 2018
  34. Dec 12, 2017
  35. Sep 01, 2017
  36. Aug 23, 2017
  37. Feb 27, 2017
Loading