diff --git a/package/libaio/libaio.mk b/package/libaio/libaio.mk index 9b28f0562a..0854fc5fd6 100644 --- a/package/libaio/libaio.mk +++ b/package/libaio/libaio.mk @@ -11,16 +11,24 @@ LIBAIO_INSTALL_STAGING = YES LIBAIO_LICENSE = LGPLv2.1+ LIBAIO_LICENSE_FILES = COPYING +LIBAIO_CONFIGURE_OPTS = $(TARGET_CONFIGURE_OPTS) + +# On PowerPC, a weird toolchain issue causes -Os builds to produce +# references to hidden symbols, so we're forcing -O2 +ifeq ($(BR2_powerpc),y) +LIBAIO_CONFIGURE_OPTS += CFLAGS="$(subst -Os,-O2,$(TARGET_CFLAGS))" +endif + define LIBAIO_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) + $(LIBAIO_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) endef define LIBAIO_INSTALL_STAGING_CMDS - $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install + $(LIBAIO_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install endef define LIBAIO_INSTALL_TARGET_CMDS - $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + $(LIBAIO_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install endef $(eval $(generic-package))