package/feh: Fix build issue with some older cross-compilers
PATCH v2 1/3 package/feh: Fix build issue with some older cross-compilers
by adding -std=gnu11 to CFLAGS.
NOTE: make needs to have variables before make as it's required by config.mk.
Fixes:
http://autobuild.buildroot.net/results/94527fcd70fa85298c366537013c939534beead0/
http://autobuild.buildroot.net/results/bf31199cdaa18971a9b599c26fbefac73b2d6f30/
http://autobuild.buildroot.net/results/5b65c305b50664e02d5f8022278055c80739342d/
http://autobuild.buildroot.net/results/ed3b9fb8d09cd677af4b8825566877c552926ae5/
--- package/feh/feh.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/feh/feh.mk +2 -2
@@ -12,8 +12,8 @@ FEH_LICENSE = MIT FEH_LICENSE_FILES = COPYING define FEH_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ - -C $(@D) all + $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -std=gnu11" $(MAKE1) \ + CC="$(TARGET_CC) $(TARGET_LDFLAGS)" -C $(@D) all endef define FEH_INSTALL_TARGET_CMDS
Signature · 1 line
2.15.0
PATCH v2 2/3 package/feh: Cleanup build configuration
* add variables before make as it's required by config.mk
* build in parallel
* use TARGET_CONFIGURE_OPTS
* cleanup FEH_INSTALL_TARGET_CMDS
--- package/feh/feh.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
package/feh/feh.mk +3 -4
@@ -12,13 +12,12 @@ FEH_LICENSE = MIT FEH_LICENSE_FILES = COPYING define FEH_BUILD_CMDS - $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -std=gnu11" $(MAKE1) \ - CC="$(TARGET_CC) $(TARGET_LDFLAGS)" -C $(@D) all + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -std=gnu11" \ + $(MAKE) -C $(@D) all endef define FEH_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) " \ - PREFIX=/usr DESTDIR=$(TARGET_DIR) -C $(@D) install + $(TARGET_MAKE_ENV) $(MAKE) PREFIX=/usr DESTDIR=$(TARGET_DIR) -C $(@D) install endef $(eval $(generic-package))
Signature · 1 line
2.15.0
PATCH v2 3/3 package/feh: Bump to version 2.22.2
In reply to Petr Vorel--- package/feh/feh.hash | 2 +- package/feh/feh.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
package/feh/feh.hash +1 -1
@@ -1,2 +1,2 @@ # Locally calculated after checking pgp signature -sha256 520481c9908d999f8f7546103b78ff9b11f41d25b0938f0a22f10aaa48beef2b feh-2.21.tar.bz2 +sha256 05a81fbe0997f6274c7617efc351647be38e5244c2624bd203459025c9a68ecd feh-2.22.2.tar.bz2
package/feh/feh.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -FEH_VERSION = 2.21 +FEH_VERSION = 2.22.2 FEH_SOURCE = feh-$(FEH_VERSION).tar.bz2 FEH_SITE = http://feh.finalrewind.org FEH_DEPENDENCIES = libcurl imlib2 libpng xlib_libXinerama xlib_libXt
Signature · 1 line
2.15.0
PATCH v2 1/3 package/feh: Fix build issue with some older cross-compilers
In reply to Petr VorelHello,
package/feh/feh.mk FEH_LICENSE = MIT · line 15
Quoted 4 lines · Petr Vorel
define
FEH_BUILD_CMDSpackage/feh/feh.mk +1
-2- $(TARGET_MAKE_ENV) $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ - -C $(@D) all + $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -std=gnu11" $(MAKE1) \
std=gnu11 was only added in gcc 4.7, so using this would break the build with gcc < 4.7. According to the error message, only C99 is needed, so could you try instead -std=c99, which is available since at least gcc 4.2 ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 1/3 package/feh: Fix build issue with some older cross-compilers
Hello Thomas,
Quoted 11 lines · Petr Vorel
package/feh/feh.mk FEH_LICENSE = MIT · line 15
Quoted 5 lines
define
FEH_BUILD_CMDSpackage/feh/feh.mk +1
-2- $(TARGET_MAKE_ENV) $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ - -C $(@D) all + $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -std=gnu11" $(MAKE1) \std=gnu11 was only added in gcc 4.7, so using this would break the build with gcc < 4.7. According to the error message, only C99 is needed, so could you try instead -std=c99, which is available since at least gcc 4.2 ?
Would it be -std=gnu99 sufficient for buildroot? Or it's a problem for some compilers? If yes, I'll patch the sources as it depends on alphasort(), which is not available on c99.
Kind regards,
Petr
PATCH v2 1/3 package/feh: Fix build issue with some older cross-compilers
Hello,
Quoted 7 lines · Petr Vorel
Quoted 4 lines
std=gnu11 was only added in gcc 4.7, so using this would break the build with gcc < 4.7. According to the error message, only C99 is needed, so could you try instead -std=c99, which is available since at least gcc 4.2 ?
Would it be -std=gnu99 sufficient for buildroot? Or it's a problem for some compilers? If yes, I'll patch the sources as it depends on
alphasort(), which is not available on c99.
gnu99 is available since gcc 4.2 as well, see
https://gcc.gnu.org/onlinedocs/gcc-4.2.0/gcc/Standards.html#Standards,
so gnu99 should be fine.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com