Skip to contentSkip to conversation

Misc. fixes for 2012.08 release

PATCH New Samuel Martin 4 participants 34 messages Jul 22, 2012 – Oct 13, 2012

lore
Share & tools
lore
#0 lore raw

cover Misc. fixes for 2012.08 release

This patch series fixes miscellaneous bugs or minor enhancements.

Almost half of this series fixes host packages build issue, mostly due to glibc update to version 2.16.

Regards,

---
Samuel Martin (11):
libgpg-error: add optional nls support
e2fsprogs: add staging install
cleanup trailing white space
elftosb: fix build forcing g++ compiler
pkg-utils.mk: fix/clean indentation
pkg-*targets.mk: factorize and fix $(PKG)_SRCDIR and $(PKG)_BUILDDIR
declaration
ext-tool.mk: add fancy messages
libpng: fix host-libpng build on system on which zlib.h is missing.
m4: fix build with glibc >=2.16
tar: fix build with glibc >=2.16
libecore: fix build with glibc >=2.16

 package/e2fsprogs/e2fsprogs.mk                     |   3 +
 ...re-ecore_exec-c-fix-build-with-glibc-2-16.patch |  62 +++++++++++++
 .../elftosb10.12.01-force_cxx_compiler.patch       | 100 +++++++++++++++++++++
 package/libgpg-error/Config.in                     |   2 +
 package/libgpg-error/libgpg-error.mk               |   7 ++
 ...ix-build-if-zlib-h-is-missing-on-the-host.patch |  47 ++++++++++
 package/libpng/libpng.mk                           |   2 +
 package/m4/m4-1.4.16-no-gets.patch                 |  38 ++++++++
 package/pkg-autotools.mk                           |  10 ---
 package/pkg-cmake.mk                               |   9 --
 package/pkg-generic.mk                             |  11 +++
 package/pkg-utils.mk                               |  41 ++++-----
 package/tar/tar-1.26-no-gets.patch                 |  47 ++++++++++
 target/Config.in.arch                              |   2 +-
 toolchain/toolchain-external/ext-tool.mk           |  11 ++-
 15 files changed, 345 insertions(+), 47 deletions(-)
 create mode 100644 package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
 create mode 100644 package/elftosb/elftosb10.12.01-force_cxx_compiler.patch
 create mode 100644 package/libpng/libpng-fix-build-if-zlib-h-is-missing-on-the-host.patch
 create mode 100644 package/m4/m4-1.4.16-no-gets.patch
 create mode 100644 package/tar/tar-1.26-no-gets.patch

--
1.7.11.2

#1 lore raw

PATCH 1/11 libgpg-error: add optional nls support

package/libgpg-error/Config.in +2 -0
index 8287f98..bb7dc0b 100644
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_LIBGPG_ERROR
 	bool "libgpg-error"
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Libgpg-error is a small library with error codes and
 	  descriptions shared by most GnuPG related software.
package/libgpg-error/libgpg-error.mk +7 -0
index 96cbbd6..0968def 100644
@@ -8,4 +8,11 @@ LIBGPG_ERROR_VERSION = 1.10
 LIBGPG_ERROR_SITE = ftp://ftp.gnupg.org/gcrypt/libgpg-error
 LIBGPG_ERROR_INSTALL_STAGING = YES
 
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+LIBGPG_ERROR_DEPENDENCIES += gettext libintl
+LIBGPG_ERROR_CONF_OPT += --enable-nls
+else
+LIBGPG_ERROR_CONF_OPT += --disable-nls
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
1.7.11.2
#2 lore raw

PATCH 1/11 libgpg-error: add optional nls support

Le Sun, 22 Jul 2012 15:28:29 +0200,
Samuel Martin <[email protected]> a ?crit :

package/libgpg-error/libgpg-error.mk LIBGPG_ERROR_VERSION = 1.10 · line 16

Quoted 6 lines
package/libgpg-error/libgpg-error.mk +6 -0
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+LIBGPG_ERROR_DEPENDENCIES += gettext libintl
+LIBGPG_ERROR_CONF_OPT += --enable-nls
+else
+LIBGPG_ERROR_CONF_OPT += --disable-nls
+endif

This means that NLS support will always be enabled for uClibc toolchains, and never be enabled for (e)glibc toolchains.

See the definition of BR2_NEEDS_GETTEXT and BR2_NEEDS_GETTEXT_IF_LOCALE:

---

# glibc and eglibc directly include gettext, so a separatly compiled
# gettext isn't needed and shouldn't be built to avoid conflicts. Some
# packages always need gettext, other packages only need gettext when
# locale support is enabled. See the documentation for how packages
# should rely on the following two options.

config BR2_NEEDS_GETTEXT
bool
default y if BR2_TOOLCHAIN_BUILDROOT default y if BR2_TOOLCHAIN_EXTERNAL_UCLIBC default y if BR2_TOOLCHAIN_CTNG_uClibc

config BR2_NEEDS_GETTEXT_IF_LOCALE

        bool
        default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)

---

The fact that there is a dependency on gettext+libintl for i18n support on uClibc toolchains is correct. The fact that --enable-nls/--disable-nls is decided depending on BR2_NEEDS_GETTEXT_IF_LOCALE is not correct.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 2/11 e2fsprogs: add staging install

In reply to Samuel Martin
package/e2fsprogs/e2fsprogs.mk +3 -0
index 16725ac..036e54e 100644
@@ -26,6 +26,9 @@ E2FSPROGS_DEPENDENCIES = host-pkg-config util-linux
 E2FSPROGS_MAKE_OPT = \
 	LDCONFIG=true
 
+E2FSPROGS_INSTALL_STAGING = YES
+E2FSPROGS_INSTALL_STAGING_OPT += install install-libs DESTDIR=$(STAGING_DIR)
+
 define HOST_E2FSPROGS_INSTALL_CMDS
  $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
 endef
Signature · 1 line
1.7.11.2
#4 lore raw

PATCH 2/11 e2fsprogs: add staging install

Le Sun, 22 Jul 2012 15:28:30 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 1 line

Do you have a justification for this? Please include it in the commit message.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH 2/11 e2fsprogs: add staging install

In reply to Samuel Martin
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Samuel> Signed-off-by: Samuel Martin <[email protected]>

Why? As far as I can see we don't have anything depending on e2fsprogs, and the libuuid stuff moved to util-linux, didn't it?

Samuel> diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk Samuel> index 16725ac..036e54e 100644
Samuel> --- a/package/e2fsprogs/e2fsprogs.mk
Samuel> +++ b/package/e2fsprogs/e2fsprogs.mk
Samuel> @@ -26,6 +26,9 @@ E2FSPROGS_DEPENDENCIES = host-pkg-config util-linux Samuel> E2FSPROGS_MAKE_OPT = \
Samuel> LDCONFIG=true

Samuel> +E2FSPROGS_INSTALL_STAGING = YES
Samuel> +E2FSPROGS_INSTALL_STAGING_OPT += install install-libs DESTDIR=$(STAGING_DIR) Samuel> +
Samuel> define HOST_E2FSPROGS_INSTALL_CMDS
Samuel> $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
Samuel> endef
Samuel> --
Samuel> 1.7.11.2

Samuel> _______________________________________________ Samuel> buildroot mailing list
Samuel> buildroot at busybox.net
Samuel> http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 2/11 e2fsprogs: add staging install

2012/10/10 Peter Korsgaard <[email protected]>:

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Samuel> Signed-off-by: Samuel Martin <[email protected]>

Why? As far as I can see we don't have anything depending on e2fsprogs, and the libuuid stuff moved to util-linux, didn't it?

Well... so far, none that I'm aware of need e2fsprogs, though some people tried to add some packages that need it some months ago. So, maybe we could just skip this patch until someone/some package need it.

Signature · 1 line
Sam
#7 lore raw

PATCH 3/11 cleanup trailing white space

In reply to Samuel Martin
target/Config.in.arch +1 -1
index 64c6dea..e7aec56 100644
@@ -242,7 +242,7 @@ choice
 	default BR2_mips_1 if BR2_mipsel
 	help
 	  Specific CPU variant to use
-	
+
 	  64bit cabable: 3, 4, 64, 64r2
 	  non-64bit capable: 1, 2, 32, 32r2
 
Signature · 1 line
1.7.11.2
#8 lore raw

PATCH 3/11 cleanup trailing white space

Le Sun, 22 Jul 2012 15:28:31 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 1 line

Applied, thanks.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#9 lore raw

PATCH 4/11 elftosb: fix build forcing g++ compiler

In reply to Samuel Martin
 create mode 100644 package/elftosb/elftosb10.12.01-force_cxx_compiler.patch
package/elftosb/elftosb10.12.01-force_cxx_compiler.patch new file +100 -0
new file mode 100644
index 0000000..f2d19d2
@@ -0,0 +1,100 @@
+Subject: [PATCH 1/1] elftosb: force host C++ compiler
+
+Because Freescale provides *.cpp sources and elftosb links again libstdc++,
+force to use the host c++ compiler.
+
+Signed-off-by: Samuel Martin <[email protected]>
+
+---
+
+This patch avoids the following error occurs:
+
+gcc AESKey.o Blob.o crc.o DataSource.o DataTarget.o ELFSourceFile.o EncoreBootImage.o EvalContext.o GHSSecInfo.o GlobMatcher.o HexValues.o Logging.o Operation.o OptionDictionary.o options.o OutputSection.o Random.o RijndaelCBCMAC.o rijndael.o SHA1.o SourceFile.o SRecordSourceFile.o stdafx.o StELFFile.o StExecutableImage.o StSRecordFile.o Value.o Version.o format_string.o ExcludesListMatcher.o SearchPath.o DataSourceImager.o IVTDataSource.o BootImageGenerator.o ConversionController.o ElftosbAST.o elftosb.o elftosb_lexer.o ElftosbLexer.o elftosb_parser.tab.o EncoreBootImageGenerator.o -lstdc++ -o elftosb
+/usr/bin/ld: ElftosbAST.o: undefined reference to symbol 'powf@@GLIBC_2.2.5'
+/usr/bin/ld: note: 'powf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
+/lib64/libm.so.6: could not read symbols: Invalid operation
+collect2: error: ld returned 1 exit status
+
+When compiling with gcc and linking against libstdc++, ld uses libc instead of
+libstdc++.
+However, libc does not provide all functions libstdc++ does.
+Indeed, maths functions are provided by libm, not libc.
+Thus, elftosb should either:
+- use gcc and link against libc and libm;
+- or use g++ and link against libstdc++.
+
+Because elftosb is written in C++, this patch implement the sencond option, using
+g++ and linking against libstdc++.
+
+---
+Index: host-elftosb-10.12.01/makefile.rules
+===================================================================
+--- host-elftosb-10.12.01.orig/makefile.rules	2012-06-09 21:12:23.557526100 +0200
++++ host-elftosb-10.12.01/makefile.rules	2012-06-09 21:15:21.659894571 +0200
+@@ -15,6 +15,8 @@
+ # UNAMES is going to be set to either "Linux" or "CYGWIN_NT-5.1"
+ UNAMES = $(shell uname -s)
+
++CXX ?= g++
++
+ #*******************************************************************************
+ #                               Directories
+
+@@ -37,9 +39,9 @@
+ #*******************************************************************************
+ #                               Build flags
+-# gcc Compiler flags
++# Compiler flags
+ #    -g						: Produce debugging information.
+
+-CFLAGS	    = -g $(INC_PATH) -D${UNAMES}
++CXXFLAGS	= -g $(INC_PATH) -D${UNAMES}
+
+ #*******************************************************************************
+ #                               File lists
+@@ -137,13 +139,13 @@ clean:
+ 		${EXEC_FILE_ELFTOSB2} ${EXEC_FILE_SBTOOL} ${EXEC_FILE_KEYGEN}
+
+ elftosb: ${OBJ_FILES_ELFTOSB2}
+-	gcc ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2}
++	$(CXX) ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2}
+
+ sbtool: ${OBJ_FILES_SBTOOL}
+-	gcc ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL}
++	$(CXX) ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL}
+
+ keygen: ${OBJ_FILES_KEYGEN}
+-	gcc ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN}
++	$(CXX) ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN}
+
+
+ #ifeq ("${UNAMES}", "Linux")
+@@ -153,10 +155,10 @@ keygen: ${OBJ_FILES_KEYGEN}
+ .SUFFIXES : .c .cpp
+
+ .c.o :
+-	gcc ${CFLAGS} -c $<
++	$(CXX) ${CXXFLAGS} -c $<
+
+ .cpp.o :
+-	gcc ${CFLAGS} -c $<
++	$(CXX) ${CXXFLAGS} -c $<
+
+ #endif
+
+@@ -165,13 +167,13 @@ keygen: ${OBJ_FILES_KEYGEN}
+
+ %.d: %.c
+ 	@set -e; \
+-	$(CC) -MM $(CFLAGS) $< | \
++	$(CXX) -MM $(CXXFLAGS) $< | \
+ 	sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
+ 	[ -s $@ ]  || rm -f $@
+
+ %.d: %.cpp
+ 	@set -e; \
+-	$(CC) -MM $(CFLAGS) $< | \
++	$(CXX) -MM $(CXXFLAGS) $< | \
+ 	sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
+ 	[ -s $@ ]  || rm -f $@
+
Signature · 1 line
1.7.11.2
#10 lore raw

PATCH 4/11 elftosb: fix build forcing g++ compiler

Le Sun, 22 Jul 2012 15:28:32 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 3 lines

+ .c.o :
+- gcc ${CFLAGS} -c $<
++ $(CXX) ${CXXFLAGS} -c $<

It should be $(CC) here, no?

package/elftosb/elftosb10.12.01-force_cxx_compiler.patch line 90

Quoted 4 lines

+ %.d: %.c

package/elftosb/elftosb10.12.01-force_cxx_compiler.patch new file +3 -0
+ 	@set -e; \
+-	$(CC) -MM $(CFLAGS) $< | \
++	$(CXX) -MM $(CXXFLAGS) $< | \

And it should remain $(CC) here, no?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#11 lore raw

PATCH 4/11 elftosb: fix build forcing g++ compiler

In reply to Samuel Martin

Le Sun, 22 Jul 2012 15:28:32 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 1 line

Thanks, applied with the CC usage instead of CXX we discussed on IRC.

I've also applied two other patches: one renaming the patches without a version number, and one that uses HOST_CONFIGURE_OPTS instead of HOST_MAKE_ENV when doing the make invocation to build elftosb. This allows to pass the correct CC, CXX, CFLAGS, CXXFLAGS and al. to the build process, which for example, allows to use ccache when building elftosb.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#12 lore raw

PATCH 5/11 pkg-utils.mk: fix/clean indentation

In reply to Samuel Martin
package/pkg-utils.mk +16 -24
index 35abb17..293bf4f 100644
@@ -17,11 +17,11 @@
 [TO]   := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _
 
 UPPERCASE = $(strip $(eval __tmp := $1) \
-     $(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \
-	$(eval __tmp :=	\
+	$(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \
+		$(eval __tmp :=	\
 		$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\
-			$(__tmp)))) \
-     $(__tmp))
+	$(__tmp)))) \
+	$(__tmp))
 
 #
 # Manipulation of .config files based on the Kconfig
@@ -30,18 +30,18 @@ UPPERCASE = $(strip $(eval __tmp := $1) \
 #
 
 define KCONFIG_ENABLE_OPT
-       $(SED) "/\\<$(1)\\>/d" $(2)
-       echo "$(1)=y" >> $(2)
+	$(SED) "/\\<$(1)\\>/d" $(2)
+	echo "$(1)=y" >> $(2)
 endef
 
 define KCONFIG_SET_OPT
-       $(SED) "/\\<$(1)\\>/d" $(3)
-       echo "$(1)=$(2)" >> $(3)
+	$(SED) "/\\<$(1)\\>/d" $(3)
+	echo "$(1)=$(2)" >> $(3)
 endef
 
 define KCONFIG_DISABLE_OPT
-       $(SED) "/\\<$(1)\\>/d" $(2)
-       echo "# $(1) is not set" >> $(2)
+	$(SED) "/\\<$(1)\\>/d" $(2)
+	echo "# $(1) is not set" >> $(2)
 endef
 
 # Helper functions to determine the name of a package and its
@@ -50,17 +50,9 @@ endef
 # automagically find where the package is located. Note that the
 # pkgdir macro is carefully written to handle the case of the Linux
 # package, for which the package directory is an empty string.
-define pkgdir
-$(dir $(lastword $(MAKEFILE_LIST)))
-endef
-
-define pkgname
-$(lastword $(subst /, ,$(call pkgdir)))
-endef
-
-define pkgparentdir
-$(patsubst %$(call pkgname)/,%,$(call pkgdir))
-endef
+pkgdir       = $(dir $(lastword $(MAKEFILE_LIST)))
+pkgname      = $(lastword $(subst /, ,$(call pkgdir)))
+pkgparentdir = $(patsubst %$(call pkgname)/,%,$(call pkgdir))
 
 # Define extractors for different archive suffixes
 INFLATE.bz2  = $(BZCAT)
@@ -72,15 +64,15 @@ INFLATE.xz   = $(XZCAT)
 INFLATE.tar  = cat
 
 # MESSAGE Macro -- display a message in bold type
-MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
-TERM_BOLD := $(shell tput smso)
+MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+TERM_BOLD  := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)
 
 # Utility functions for 'find'
 # findfileclauses(filelist) => -name 'X' -o -name 'Y'
 findfileclauses = $(call notfirstword,$(patsubst %,-o -name '%',$(1)))
 # finddirclauses(base, dirlist) => -path 'base/dirX' -o -path 'base/dirY'
-finddirclauses = $(call notfirstword,$(patsubst %,-o -path '$(1)/%',$(2)))
+finddirclauses  = $(call notfirstword,$(patsubst %,-o -path '$(1)/%',$(2)))
 
 # Miscellaneous utility functions
 # notfirstword(wordlist): returns all but the first word in wordlist
Signature · 1 line
1.7.11.2
#13 lore raw

PATCH 5/11 pkg-utils.mk: fix/clean indentation

Le Sun, 22 Jul 2012 15:28:33 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 1 line

Applied, thanks.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#14 lore raw

PATCH 6/11 pkg-*targets.mk: factorize and fix $(PKG)_SRCDIR and $(PKG)_BUILDDIR declaration

In reply to Samuel Martin
package/pkg-autotools.mk +0 -10
index e454050..785daab 100644
@@ -54,15 +54,6 @@ endef
 
 define inner-autotools-package
 
-# define package-specific variables to default values
-ifndef $(2)_SUBDIR
- ifdef $(3)_SUBDIR
-  $(2)_SUBDIR = $($(3)_SUBDIR)
- else
-  $(2)_SUBDIR ?=
- endif
-endif
-
 ifndef $(2)_LIBTOOL_PATCH
  ifdef $(3)_LIBTOOL_PATCH
   $(2)_LIBTOOL_PATCH = $($(3)_LIBTOOL_PATCH)
@@ -91,7 +82,6 @@ $(2)_CLEAN_OPT			?= clean
 $(2)_UNINSTALL_STAGING_OPT	?= DESTDIR=$$(STAGING_DIR) uninstall
 $(2)_UNINSTALL_TARGET_OPT	?= DESTDIR=$$(TARGET_DIR)  uninstall
 
-$(2)_SRCDIR                     = $$($(2)_DIR)/$$($(2)_SUBDIR)
 
 #
 # Configure step. Only define it if not already defined by the package
package/pkg-cmake.mk +0 -9
index f9a5934..626a0b0 100644
@@ -37,15 +37,6 @@
 
 define inner-cmake-package
 
-# define package-specific variables to default values
-ifndef $(2)_SUBDIR
- ifdef $(3)_SUBDIR
-  $(2)_SUBDIR = $($(3)_SUBDIR)
- else
-  $(2)_SUBDIR ?=
- endif
-endif
-
 $(2)_CONF_ENV			?=
 $(2)_CONF_OPT			?=
 $(2)_MAKE			?= $(MAKE)
package/pkg-generic.mk +11 -0
index c01440e..8a730c0 100644
@@ -204,6 +204,17 @@ $(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
 $(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
 $(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
 
+ifndef $(3)_SUBDIR
+ ifdef $(2)_SUBDIR
+  $(3)_SUBDIR = $$($(2)_SUBDIR)
+ else
+  $(3)_SUBDIR ?=
+ endif
+endif
+
+$(2)_SRCDIR		       = $$($(2)_DIR)/$$($(2)_SUBDIR)
+$(2)_BUILDDIR		       ?= $$($(2)_SRCDIR)
+
 ifneq ($$($(2)_OVERRIDE_SRCDIR),)
 $(2)_VERSION = custom
 endif
Signature · 1 line
1.7.11.2
#15 lore raw

PATCH 6/11 pkg-*targets.mk: factorize and fix $(PKG)_SRCDIR and $(PKG)_BUILDDIR declaration

Le Sun, 22 Jul 2012 15:28:34 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 1 line

Applied, thanks.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#16 lore raw

PATCH 7/11 ext-tool.mk: add fancy messages

In reply to Samuel Martin
package/pkg-utils.mk +1 -0
index 293bf4f..0861673 100644
@@ -65,6 +65,7 @@ INFLATE.tar  = cat
 
 # MESSAGE Macro -- display a message in bold type
 MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+MESSAGE2    = echo "$(TERM_BOLD)>>> $(1) $(2)$(TERM_RESET)"
 TERM_BOLD  := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)
 
toolchain/toolchain-external/ext-tool.mk +8 -3
index 3f58aad..6e23994 100644
@@ -265,12 +265,14 @@ endif
 # components than usual.
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1),y)
 $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1):
+	@$(call MESSAGE2,External toolchain,Downloading)
 	$(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE_1)/$(TOOLCHAIN_EXTERNAL_SOURCE_1))
 
 $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2):
 	$(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE_2)/$(TOOLCHAIN_EXTERNAL_SOURCE_2))
 
 $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2)
+	@$(call MESSAGE2,External toolchain,Extracting)
 	mkdir -p $(@D)
 	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE_1))) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) | \
 		$(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
@@ -291,9 +293,11 @@ endif
 else
 # Download and extraction of a toolchain
 $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE):
+	@$(call MESSAGE2,External toolchain,Downloading)
 	$(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE)$(TOOLCHAIN_EXTERNAL_SOURCE),$(TOOLCHAIN_EXTERNAL_SOURCE))
 
 $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE)
+	@$(call MESSAGE2,External toolchain,Extracting)
 	mkdir -p $(@D)
 	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | \
 		$(TAR) $(TAR_STRIP_COMPONENTS)=1 --exclude='usr/lib/locale/*' -C $(@D) $(TAR_OPTIONS) -
@@ -305,7 +309,7 @@ endif
 # matches the configuration provided in Buildroot: ABI, C++ support,
 # type of C library and all C library features.
 $(STAMP_DIR)/ext-toolchain-checked: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
-	@echo "Checking external toolchain settings"
+	@$(call MESSAGE2,External toolchain,Checking external toolchain settings)
 	$(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC))
 	$(Q)LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a)` ; \
 	SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e 's:usr/lib(64)?/(.*/)?libc\.a::'` ; \
@@ -394,7 +398,7 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked
 	ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
 	mkdir -p $(TARGET_DIR)/lib ; \
 	if test -z "$(BR2_PREFER_STATIC_LIB)" ; then \
-		echo "Copy external toolchain libraries to target..." ; \
+		$(call MESSAGE2,External toolchain,Copying external toolchain libraries to target) ; \
 		for libs in $(LIB_EXTERNAL_LIBS); do \
 			$(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/lib); \
 		done ; \
@@ -402,7 +406,7 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked
 			$(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/usr/lib); \
 		done ; \
 	fi ; \
-	echo "Copy external toolchain sysroot to staging..." ; \
+	$(call MESSAGE2,External toolchain,Copying external toolchain sysroot to staging) ; \
 	$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR}) ; \
 	if [ -L $${ARCH_SYSROOT_DIR}/lib64 ] ; then \
 		$(call create_lib64_symlinks) ; \
@@ -426,6 +430,7 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked
 # Build toolchain wrapper for preprocessor, C and C++ compiler, and setup
 # symlinks for everything else
 $(HOST_DIR)/usr/bin/ext-toolchain-wrapper: $(STAMP_DIR)/ext-toolchain-installed
+	@$(call MESSAGE2,External toolchain,Installing toolchain wrapper) ; \
 	mkdir -p $(HOST_DIR)/usr/bin; cd $(HOST_DIR)/usr/bin; \
 	for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
 		base=$${i##*/}; \
Signature · 1 line
1.7.11.2
#17 lore raw

PATCH 7/11 ext-tool.mk: add fancy messages

Le Sun, 22 Jul 2012 15:28:35 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 8 lines
package/pkg-utils.mk +0 -0
index 293bf4f..0861673 100644

package/pkg-utils.mk INFLATE.tar = cat · line 70

Quoted 6 lines
package/pkg-utils.mk +1 -0
@@ -65,6 +65,7 @@ INFLATE.tar  = cat
 
 # MESSAGE Macro -- display a message in bold type
 MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+MESSAGE2    = echo "$(TERM_BOLD)>>> $(1) $(2)$(TERM_RESET)"
 TERM_BOLD  := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)

Maybe we need:

MESSAGE = echo "$(TERM_BOLD)>>> $(1) $(2)$(TERM_RESET)"
PKG_MESSAGE = $(call MESSAGE,$($(PKG)_NAME) $($(PKG)_VERSION),$(1))

And then use PKG_MESSAGE in the package infrastructure, and MESSAGE in other places. But definitely MESSAGE vs. MESSAGE2 is ugly.

And maybe the MESSAGE definition would have to be somewhere outside of pkg-utils.mk since it's not package related anymore.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#18 lore raw

PATCH 7/11 ext-tool.mk: add fancy messages

Quoted 20 lines · Thomas Petazzoni

Le Sun, 22 Jul 2012 15:28:35 +0200,
Samuel Martin<[email protected]> a ?crit :

Quoted 8 lines
package/pkg-utils.mk +0 -0
index 293bf4f..0861673 100644

package/pkg-utils.mk INFLATE.tar = cat · line 70

Quoted 6 lines
package/pkg-utils.mk +1 -0
@@ -65,6 +65,7 @@ INFLATE.tar  = cat
 
  # MESSAGE Macro -- display a message in bold type
  MESSAGE     = echo "$(TERM_BOLD)>>>  $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+MESSAGE2    = echo "$(TERM_BOLD)>>>  $(1) $(2)$(TERM_RESET)"
  TERM_BOLD  := $(shell tput smso)
  TERM_RESET := $(shell tput rmso)

Maybe we need:

Quoted 5 lines

MESSAGE = echo "$(TERM_BOLD)>>> $(1) $(2)$(TERM_RESET)"
PKG_MESSAGE = $(call MESSAGE,$($(PKG)_NAME) $($(PKG)_VERSION),$(1))

And then use PKG_MESSAGE in the package infrastructure, and MESSAGE in other places. But definitely MESSAGE vs. MESSAGE2 is ugly.

+1 for that.

Quoted 2 lines

And maybe the MESSAGE definition would have to be somewhere outside of pkg-utils.mk since it's not package related anymore.

In fact everything in pkg-* is not strictly package-related anymore, since
it's also used by bootloaders and kernel, and download helpers are also used by the external toolchains. So if we start moving stuff around, probably everything should just go into e.g. support/make/

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#19 lore raw

PATCH 7/11 ext-tool.mk: add fancy messages

Le Wed, 25 Jul 2012 18:25:25 +0200,
Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 7 lines
Quoted 2 lines

And maybe the MESSAGE definition would have to be somewhere outside of pkg-utils.mk since it's not package related anymore.

In fact everything in pkg-* is not strictly package-related anymore, since
it's also used by bootloaders and kernel, and download helpers are also used by the external toolchains. So if we start moving stuff around, probably everything should just go into e.g. support/make/

Well, even though boot/ and linux/ are outside package/, they still use the normal package infrastructures, so I am not terribly shocked to see those things being called pkg-* in package/. However, I agree that the download helpers now have a more wisdespread usage.

The thing with support/make/ is that it seems to me a little bit hidden behind the scenes.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#20 lore raw

PATCH 8/11 libpng: fix host-libpng build on system on which zlib.h is missing.

In reply to Samuel Martin

This patch ensures libpng.sym is generated using the same zlib.h as the one used for building binaries.

As a side effect, this patch fix host-libpng build on freshly installed debian-based systems, on which zlib development data may be not installed.

 create mode 100644 package/libpng/libpng-fix-build-if-zlib-h-is-missing-on-the-host.patch
package/libpng/libpng-fix-build-if-zlib-h-is-missing-on-the-host.patch new file +47 -0
new file mode 100644
index 0000000..4e22498
@@ -0,0 +1,47 @@
+This patch ensure that '$(O)/host/usr/include' is added to the command generating
+libpng.sym.
+
+This allows building host-libpng on a system missing zlib development data, which
+are provided by '$(O)/host/usr/include' though.
+
+This avoid the following error occurs:
+
+/usr/bin/cpp -DPNG_CONFIGURE_LIBPNG  -DPNG_BUILDSYMS ./png.h | \
+		/bin/sed -n -e \
+		's|^.*PNG_FUNCTION_EXPORT[ 	]*\(['_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789']*\).*$|\1|p' \
+		-e 's|^.*PNG_DATA_EXPORT[ 	]*\(['_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789']*\).*$|\1|p' \
+			>libpng.sym.new
+./png.h:421:18: fatal error: zlib.h: No such file or directory
+[...]
+libtool: link: /usr/bin/gcc -shared  .libs/libpng14_la-png.o .libs/libpng14_la-pngset.o .libs/libpng14_la-pngget.o .libs/libpng14_la-pngrutil.o .libs/libpng14_la-pngtrans.o .libs/libpng14_la-pngwutil.o .libs/libpng14_la-pngread.o .libs/libpng14_la-pngrio.o .libs/libpng14_la-pngwio.o .libs/libpng14_la-pngwrite.o .libs/libpng14_la-pngrtran.o .libs/libpng14_la-pngwtran.o .libs/libpng14_la-pngmem.o .libs/libpng14_la-pngerror.o .libs/libpng14_la-pngpread.o   -L/opt/buildroot/output/host/lib -L/opt/buildroot/output/host/usr/lib -lz -lm  -Wl,--version-script=libpng.vers -Wl,-rpath -Wl,/opt/buildroot/output/host/usr/lib   -Wl,-soname -Wl,libpng14.so.14 -o .libs/libpng14.so.14.11.0
+/usr/bin/ld:libpng.vers:2: syntax error in VERSION script
+collect2: ld returned 1 exit status
+make[2]: *** [libpng14.la] Error 1
+
+Signed-off-by: Samuel Martin <[email protected]>
+
+---
+diff -purN host-libpng-1.4.11.orig/Makefile.am host-libpng-1.4.11/Makefile.am
+--- host-libpng-1.4.11.orig/Makefile.am	2012-07-22 01:06:18.692261599 +0000
++++ host-libpng-1.4.11/Makefile.am	2012-07-22 01:11:59.350414529 +0000
+@@ -95,7 +95,7 @@ $(PNGLIB_BASENAME)-config: libpng-config
+ 
+ libpng.sym: png.h pngconf.h
+ 	rm -f $@ [email protected]
+-	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
++	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) $(CFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
+ 		$(SED) -n -e \
+ 		's|^.*PNG_FUNCTION_EXPORT[ 	]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
+ 		-e 's|^.*PNG_DATA_EXPORT[ 	]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
+diff -purN host-libpng-1.4.11.orig/Makefile.in host-libpng-1.4.11/Makefile.in
+--- host-libpng-1.4.11.orig/Makefile.in	2012-07-22 01:06:18.692261599 +0000
++++ host-libpng-1.4.11/Makefile.in	2012-07-22 01:12:38.093537811 +0000
+@@ -1214,7 +1214,7 @@ $(PNGLIB_BASENAME)-config: libpng-config
+ 
+ libpng.sym: png.h pngconf.h
+ 	rm -f $@ [email protected]
+-	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
++	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) $(CFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
+ 		$(SED) -n -e \
+ 		's|^.*PNG_FUNCTION_EXPORT[ 	]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
+ 		-e 's|^.*PNG_DATA_EXPORT[ 	]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
package/libpng/libpng.mk +2 -0
index dd295c6..7b17e72 100644
@@ -30,5 +30,7 @@ ifneq ($(BR2_HAVE_DEVFILES),y)
 LIBPNG_POST_INSTALL_TARGET_HOOKS += LIBPNG_REMOVE_CONFIG_SCRIPTS
 endif
 
+HOST_LIBPNG_AUTORECONF = YES
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
Signature · 1 line
1.7.11.2
#21 lore raw

PATCH 8/11 libpng: fix host-libpng build on system on which zlib.h is missing.

Le Sun, 22 Jul 2012 15:28:36 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 2 lines
+-	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
++	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) $(CFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \

Shouldn't we be passing the right arguments in CPPFLAGS instead?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#22 lore raw

PATCH 8/11 libpng: fix host-libpng build on system on which zlib.h is missing.

Quoted 7 lines · Thomas Petazzoni

Le Sun, 22 Jul 2012 15:28:36 +0200,
Samuel Martin<[email protected]> a ?crit :

Quoted 2 lines
+-	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
++	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) $(CFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \

Shouldn't we be passing the right arguments in CPPFLAGS instead?

Good point. HOST_CONFIGURE_OPTS doesn't set CPPFLAGS at all...

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#23 lore raw

PATCH 8/11 libpng: fix host-libpng build on system on which zlib.h is missing.

Le Wed, 25 Jul 2012 19:39:46 +0200,
Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
+-	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
++	$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) $(CFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \

Shouldn't we be passing the right arguments in CPPFLAGS instead?

Good point. HOST_CONFIGURE_OPTS doesn't set CPPFLAGS at all...

To what value should we set CPPFLAGS then?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#24 lore raw

PATCH 9/11 m4: fix build with glibc >=2.16

In reply to Samuel Martin
 create mode 100644 package/m4/m4-1.4.16-no-gets.patch
package/m4/m4-1.4.16-no-gets.patch new file +38 -0
new file mode 100644
index 0000000..a057377
@@ -0,0 +1,38 @@
+Since the 2.16 release of the glibc, 'gets' is not any more defined in the gnulib.
+No m4 version synchronized with gnulib since [1] has been released yet.
+
+This patch avoids the following error occurs when building m4 <=1.4.16 on host using
+a glibc >=2.16:
+
+make[4]: Entering directory `/opt/buildroot/output/build/host-m4-1.4.16/lib'
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99  -I.     -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT gl_avltree_oset.o -MD -MP -MF .deps/gl_avltree_oset.Tpo -c -o gl_avltree_oset.o gl_avltree_oset.c
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99  -I.     -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT c-ctype.o -MD -MP -MF .deps/c-ctype.Tpo -c -o c-ctype.o c-ctype.c
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99  -I.     -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT c-stack.o -MD -MP -MF .deps/c-stack.Tpo -c -o c-stack.o c-stack.c
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99  -I.     -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT clean-temp.o -MD -MP -MF .deps/clean-temp.Tpo -c -o clean-temp.o clean-temp.c
+mv -f .deps/c-ctype.Tpo .deps/c-ctype.Po
+/opt/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -std=gnu99  -I.     -O2 -I/opt/buildroot/output/host/include -I/opt/buildroot/output/host/usr/include -MT close-hook.o -MD -MP -MF .deps/close-hook.Tpo -c -o close-hook.o close-hook.c
+In file included from clean-temp.h:22:0,
+                 from clean-temp.c:23:
+./stdio.h:477:20: error 'gets' undeclared here (not in a function)
+make[4]: *** [clean-temp.o] Error 1
+
+References:
+[1] http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=66712c23388e93e5c518ebc8515140fa0c807348
+[2] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/m4/files/m4-1.4.16-no-gets.patch?diff_format=h&revision=1.1&view=markup
+
+Signed-off-by: Samuel Martin <[email protected]>
+
+---
+diff -purN host-m4-1.4.16.orig/lib/stdio.in.h host-m4-1.4.16/lib/stdio.in.h
+--- host-m4-1.4.16.orig/lib/stdio.in.h	2012-07-21 19:11:40.196541826 +0200
++++ host-m4-1.4.16/lib/stdio.in.h	2012-07-21 20:46:05.405850751 +0200
+@@ -162,7 +162,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
Signature · 1 line
1.7.11.2
#25 lore raw

PATCH 9/11 m4: fix build with glibc >=2.16

Le Sun, 22 Jul 2012 15:28:37 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 1 line

Applied, thanks.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#26 lore raw

PATCH 10/11 tar: fix build with glibc >=2.16

In reply to Samuel Martin
 create mode 100644 package/tar/tar-1.26-no-gets.patch
package/tar/tar-1.26-no-gets.patch new file +47 -0
new file mode 100644
index 0000000..fb9d188
@@ -0,0 +1,47 @@
+Since the 2.16 release of the glibc, 'gets' is not any more defined in the gnulib.
+No tar version synchronized with gnulib since [1] has been released yet.
+
+This patch avoids the following error occurs when building tar <=1.4.16 on host using
+a glibc >=2.16:
+
+make[5]: Entering directory `/home/samuel/data/workspace/src/buildroot/master/output/build/host-tar-1.26/gnu'
+  CC     areadlink.o
+  CC     areadlinkat.o
+  CC     argp-ba.o
+  CC     argp-eexst.o
+  CC     argp-fmtstream.o
+  CC     argp-fs-xinl.o
+In file included from argp.h:24:0,
+                 from argp-eexst.c:27:
+./stdio.h:479:1: error ?gets? undeclared here (not in a function)
+make[5]: *** [argp-eexst.o] Error 1
+make[5]: *** Waiting for unfinished jobs....
+In file included from argp-fmtstream.h:29:0,
+                 from argp-fs-xinl.c:28:
+./stdio.h:479:1: error ?gets? undeclared here (not in a function)
+make[5]: *** [argp-fs-xinl.o] Error 1
+In file included from argp-fmtstream.h:29:0,
+                 from argp-fmtstream.c:35:
+./stdio.h:479:1: error ?gets? undeclared here (not in a function)
+make[5]: *** [argp-fmtstream.o] Error 1
+
+References:
+[1] http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=66712c23388e93e5c518ebc8515140fa0c807348
+[2] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/m4/files/m4-1.4.16-no-gets.patch?diff_format=h&revision=1.1&view=markup
+
+Signed-off-by: Samuel Martin <[email protected]>
+
+---
+diff -purN host-tar-1.26.orig/gnu/stdio.in.h host-tar-1.26/gnu/stdio.in.h
+--- host-tar-1.26.orig/gnu/stdio.in.h	2012-07-21 21:17:12.392403084 +0200
++++ host-tar-1.26/gnu/stdio.in.h	2012-07-21 21:18:27.991993525 +0200
+@@ -164,7 +164,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
Signature · 1 line
1.7.11.2
#27 lore raw

PATCH 10/11 tar: fix build with glibc >=2.16

Le Sun, 22 Jul 2012 15:28:38 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 1 line

Applied, thanks.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#28 lore raw

PATCH 11/11 libecore: fix build with glibc >=2.16

In reply to Samuel Martin
 create mode 100644 package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch new file +62 -0
new file mode 100644
index 0000000..9d53dfd
@@ -0,0 +1,62 @@
+This patch fix build with glibc-2.16, avoiding the following error occurs:
+
+Making all in ecore
+make[6]: Entering directory `/opt/buildroot/output/build/host-libecore-1.1.0/src/lib/ecore'
+  CC     ecore.lo
+  CC     ecore_anim.lo
+  CC     ecore_app.lo
+  CC     ecore_events.lo
+  CC     ecore_getopt.lo
+  CC     ecore_idle_enterer.lo
+  CC     ecore_idle_exiter.lo
+  CC     ecore_idler.lo
+  CC     ecore_job.lo
+  CC     ecore_main.lo
+  CC     ecore_pipe.lo
+  CC     ecore_poll.lo
+  CC     ecore_time.lo
+  CC     ecore_timer.lo
+  CC     ecore_thread.lo
+  CC     ecore_glib.lo
+  CC     ecore_throttle.lo
+  CC     ecore_signal.lo
+  CC     ecore_exe.lo
+ecore_exe.c: In function ?ecore_exe_pipe_run?:
+ecore_exe.c:486:15: warning: implicit declaration of function ?setpriority? [-Wimplicit-function-declaration]
+ecore_exe.c:486:27: error ?PRIO_PROCESS? undeclared (first use in this function)
+ecore_exe.c:486:27: note: each undeclared identifier is reported only once for each function it appears in
+make[6]: *** [ecore_exe.lo] Error 1
+
+
+Signed-off-by: Samuel Martin <[email protected]>
+
+---
+diff -purN host-libecore-1.1.0.orig/src/lib/ecore/ecore_exe.c host-libecore-1.1.0/src/lib/ecore/ecore_exe.c
+--- host-libecore-1.1.0.orig/src/lib/ecore/ecore_exe.c	2011-10-21 07:37:11.000000000 +0200
++++ host-libecore-1.1.0/src/lib/ecore/ecore_exe.c	2012-07-22 10:46:00.362956073 +0200
+@@ -2,11 +2,6 @@
+ # include <config.h>
+ #endif
+ 
+-#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
+-# include <sys/time.h>
+-# include <sys/resource.h>
+-#endif
+-
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -15,6 +10,13 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ 
++#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || ( defined(__linux__) && defined(__GLIBC__) && !defined(__UCLIBC__) && __GLIBC_PREREQ(2, 16) )
++# if !defined(__linux__)
++#  include <sys/time.h>
++# endif
++# include <sys/resource.h>
++#endif
++
+ #ifdef HAVE_SYS_PRCTL_H
+ # include <sys/prctl.h>
+ #endif
Signature · 1 line
1.7.11.2
#29 lore raw

PATCH 11/11 libecore: fix build with glibc >=2.16

Le Sun, 22 Jul 2012 15:28:39 +0200,
Samuel Martin <[email protected]> a ?crit :

Quoted 1 line

Wouldn't it be better to backport the upstream fix, i.e
http://trac.enlightenment.org/e/changeset/72684/ ?

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#30 lore raw

PATCH 11/11 libecore: fix build with glibc >=2.16

In reply to Samuel Martin
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Hi,

Samuel> Signed-off-by: Samuel Martin <[email protected]>

Samuel> create mode 100644 package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch

Samuel> diff --git a/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch Samuel> new file mode 100644
Samuel> index 0000000..9d53dfd
Samuel> --- /dev/null
Samuel> +++ b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
Samuel> @@ -0,0 +1,62 @@
Samuel> +This patch fix build with glibc-2.16, avoiding the following error occurs:
Samuel> +

Did you send this patch upstream? If so, what is the status of it?

Signature · 1 line
Bye, Peter Korsgaard
#31 lore raw

PATCH 11/11 libecore: fix build with glibc >=2.16

Hi,

2012/10/10 Peter Korsgaard <[email protected]>:

Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Hi,

Samuel> Signed-off-by: Samuel Martin <[email protected]>

Samuel> create mode 100644 package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch

Samuel> diff --git a/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch Samuel> new file mode 100644
Samuel> index 0000000..9d53dfd
Samuel> --- /dev/null
Samuel> +++ b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
Samuel> @@ -0,0 +1,62 @@
Samuel> +This patch fix build with glibc-2.16, avoiding the following error occurs:
Samuel> +

Quoted 1 line

Did you send this patch upstream? If so, what is the status of it?

Arf... Got lost in my mailbox... So no, I haven't sent it upstream.

I willl check upstream and let you know its status.

Signature · 1 line
Sam
#32 lore raw

PATCH 11/11 libecore: fix build with glibc >=2.16

Quoted 4 lines · Samuel Martin
Quoted 1 line

Did you send this patch upstream? If so, what is the status of it?

Arf... Got lost in my mailbox... So no, I haven't sent it upstream.

I willl check upstream and let you know its status.

Well, back in July, I said:
http://lists.busybox.net/pipermail/buildroot/2012-July/056005.html

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#33 lore raw

PATCH 11/11 libecore: fix build with glibc >=2.16

Hi Thomas, Peter, all,

2012/10/11 Thomas Petazzoni <[email protected]>:

Quoted 11 lines · Samuel Martin
Quoted 5 lines
Quoted 2 lines

Did you send this patch upstream? If so, what is the status of it?

Arf... Got lost in my mailbox... So no, I haven't sent it upstream.

I willl check upstream and let you know its status.

Well, back in July, I said:
http://lists.busybox.net/pipermail/buildroot/2012-July/056005.html

Thomas, thanks for the reminder ;)

The upstream patch works too.
I'll post it shortly

Regards,

Signature · 1 line
Sam