kumquat-buildroot/package/ace/ace.mk
Yann E. MORIN b717880f1f paclage/ace: explain why we use C+ pre-processor flags for C++ flags
Commit e8011a08b6 (package/ace: needs C++11) did not explain why it
passed C++ flags via the pre-processor flags rather than as C++ flags
(via ACE's CCFLAGS).

This caused some head-scratching when reviewing and applying
803247337d (package/ace: fix build failure due to gcc bug 101915).

Add a comment to try and explain the non-standard use of pre-processor
flags to pass actual C++ flags.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc; Weber, Matthew L Collins <Matthew.Weber@collins.com>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-08-14 15:29:01 +02:00

76 lines
2.0 KiB
Makefile

################################################################################
#
# ace
#
################################################################################
ACE_VERSION = 7.0.6
ACE_SOURCE = ACE-$(ACE_VERSION).tar.bz2
ACE_SITE = http://download.dre.vanderbilt.edu/previous_versions
ACE_LICENSE = DOC
ACE_LICENSE_FILES = COPYING
ACE_INSTALL_STAGING = YES
ACE_CPE_ID_VENDOR = vanderbilt
ACE_CPE_ID_PRODUCT = adaptive_communication_environment
# Note: We are excluding examples, apps and tests
# Only compiling ACE libraries (no TAO)
ACE_LIBARIES = ace ACEXML Kokyu netsvcs protocols/ace
ACE_CPPFLAGS = $(TARGET_CPPFLAGS) -std=c++11
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101915),y)
ACE_CPPFLAGS += -O0
endif
# ACE uses DEFFLAGS as C++ pre-processor flags, and CCFLAGS as the C++ flags.
# Ace passes the pre-processor flags after the C++ flags, so we pass our
# C++ flags as pre-processor flags, via DEFFLAGS.
ACE_MAKE_OPTS = \
ACE_ROOT="$(@D)" \
DEFFLAGS="$(ACE_CPPFLAGS)"
ifeq ($(BR2_PACKAGE_OPENSSL),y)
ACE_LIBARIES += ace/SSL
ACE_DEPENDENCIES += openssl
define ACE_CONFIGURE_SSL
echo "ssl = 1" >> $(@D)/include/makeinclude/platform_macros.GNU
endef
endif
# configure the target build
# refer: http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix
define ACE_CONFIGURE_CMDS
# create a config file
echo ' #include "ace/config-linux.h" ' >> $(@D)/ace/config.h
# Create platform/compiler-specific Makefile configurations
$(INSTALL) -m 0644 package/ace/platform_macros.GNU $(@D)/include/makeinclude/
$(ACE_CONFIGURE_SSL)
endef
define ACE_BUILD_CMDS
$(foreach lib,$(ACE_LIBARIES), \
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/$(lib) \
$(ACE_MAKE_OPTS) all
)
endef
define ACE_LIBARIES_INSTALL
mkdir -p $(1)/usr/share/ace
$(foreach lib,$(ACE_LIBARIES), \
$(MAKE) -C $(@D)/$(lib) $(ACE_MAKE_OPTS) DESTDIR=$(1) install
)
endef
define ACE_INSTALL_TARGET_CMDS
$(call ACE_LIBARIES_INSTALL,$(TARGET_DIR))
endef
define ACE_INSTALL_STAGING_CMDS
$(call ACE_LIBARIES_INSTALL,$(STAGING_DIR))
endef
$(eval $(generic-package))