ptpd2: fix bfin compile by avoiding gcc bug
authorWaldemar Brodkorb <wbx@openadk.org>
Mon, 21 Nov 2016 18:32:18 +0000 (19:32 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 21 Nov 2016 20:54:51 +0000 (21:54 +0100)
Fixes:
  http://autobuild.buildroot.net/results/cb967c8af006caa9272e800968f794ca018a7a27
  http://autobuild.buildroot.net/results/9a046dc5ef390e562b89338f0afeaef14b945458

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
[Thomas: also pass TARGET_CFLAGS.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ptpd2/ptpd2.mk

index da6a10684bb9df1311a5aab25d0b0e69b86b2357..d53b13534c30d7b77330abd2ee1ae3bfa0cbe29a 100644 (file)
@@ -24,6 +24,12 @@ else
 PTPD2_CONF_OPTS += --disable-snmp
 endif
 
+# GCC bug with Os/O1/O2/O3
+# internal compiler error: in gen_add2_insn, at optabs.c:4454
+ifeq ($(BR2_bfin),y)
+PTPD2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 define PTPD2_INSTALL_INIT_SYSV
        $(INSTALL) -m 755 -D package/ptpd2/S65ptpd2 \
                $(TARGET_DIR)/etc/init.d/S65ptpd2