Skip to content

Commit

Permalink
parted.make - support versions 3.1 and 3.4
Browse files Browse the repository at this point in the history
This adds conditional logic so that:
 armv8a compiles with parted 3.4
 x86_64 compiles with parted 3.1

And adds a parted-configure-help option to see parted
configuration options.

The reason for the two version is that armv8a, which uses
glibc for its C libraries, could build 3.4, not 3.1, and
x86_64, which uses uClibc for it's C libraries, does not
support certain 'locale' options in any way that could be
used by the 3.4 version of parted ( look for compile errors
with 'atari.c' )

While I would like to see both builds using the same version,
after putting a few days of effort in to re-configuring
crosstool-ng to reconfigure uClibc (and changing the uClibc
configuration file), and examining parted configuration options,
and reading comments about how support for this was mostly
workarounds, I concluded that uClibc just wasn't ready for this,
and kept the older version for x86_64.

uClibc configuration values of interest (either set or not) are
UCLIBC_HAS_LOCALE
UCLIBC_HAS_XLOCALE
UCLIBC_BUILD_ALL_LOCALE
UCLIBC_BUILD_MINIMAL_LOCALE

crosstool-ng configuration values of interest are:
CT_LIBC_UCLIBC_LOCALES

Some permutation of the above may work, and I'd love to
see a pull request that fixes this.

Signed-off-by: Alex Doyle <[email protected]>
  • Loading branch information
ehdoyle committed Aug 19, 2021
1 parent bfec146 commit 1fbfb36
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 13 additions & 2 deletions build-config/make/parted.make
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#-------------------------------------------------------------------------------
#
# Copyright (C) 2021 Alex Doyle <[email protected]>
# Copyright (C) 2014,2017 Curt Brune <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0
Expand All @@ -9,7 +10,12 @@
# This is a makefile fragment that defines the build of parted
#

PARTED_VERSION = 3.1
ifeq ($(ONIE_ARCH),armv8a)
PARTED_VERSION = 3.4
else
PARTED_VERSION = 3.1
endif

PARTED_TARBALL = parted-$(PARTED_VERSION).tar.xz
PARTED_TARBALL_URLS += $(ONIE_MIRROR) http://ftp.gnu.org/gnu/parted/
PARTED_BUILD_DIR = $(USER_BUILDDIR)/parted
Expand All @@ -29,7 +35,7 @@ PARTED_STAMP = $(PARTED_SOURCE_STAMP) \

PHONY += parted parted-download parted-source \
parted-configure parted-build parted-install parted-clean \
parted-download-clean
parted-download-clean parted-configure-help

PARTED_SBIN = parted partprobe

Expand Down Expand Up @@ -73,6 +79,11 @@ $(PARTED_CONFIGURE_STAMP): $(PARTED_SOURCE_STAMP) $(E2FSPROGS_BUILD_STAMP) $(LVM
LDFLAGS="$(ONIE_LDFLAGS)"
$(Q) touch $@

# Print configure options for debug
parted-configure-help: $(PARTED_CONFIGURE_STAMP)
$(Q) echo "==== Configure parted-$(PARTED_VERSION) ===="
$(Q) $(PARTED_DIR)/configure -help

parted-build: $(PARTED_BUILD_STAMP)
$(PARTED_BUILD_STAMP): $(PARTED_CONFIGURE_STAMP)
$(Q) rm -f $@ && eval $(PROFILE_STAMP)
Expand Down
1 change: 1 addition & 0 deletions upstream/parted-3.4.tar.xz.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
903c58fab429d3b62aa324033a3e41b0b96ad810 parted-3.4.tar.xz

0 comments on commit 1fbfb36

Please sign in to comment.