components/cloog/Makefile
changeset 5359 57359db17e2a
child 5682 94c0ca64c022
equal deleted inserted replaced
5358:fe333c2ff3dc 5359:57359db17e2a
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
       
    22 #
       
    23 
       
    24 COMPILER=gcc
       
    25 
       
    26 include ../../make-rules/shared-macros.mk
       
    27 
       
    28 COMPONENT_NAME=		cloog
       
    29 COMPONENT_VERSION=	0.18.3
       
    30 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    31 COMPONENT_PROJECT_URL=	http://www.cloog.org/
       
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    33 COMPONENT_ARCHIVE_HASH=	\
       
    34     sha256:460c6c740acb8cdfbfbb387156b627cf731b3837605f2ec0001d079d89c69734
       
    35 COMPONENT_ARCHIVE_URL=	http://www.bastoul.net/cloog/pages/download/$(COMPONENT_ARCHIVE)
       
    36 COMPONENT_BUGDB=	library/cloog
       
    37 
       
    38 TPNO=			23800
       
    39 
       
    40 include ../../make-rules/prep.mk
       
    41 include ../../make-rules/configure.mk
       
    42 include ../../make-rules/ips.mk
       
    43 
       
    44 PATCH_LEVEL := 0
       
    45 PKG_PROTO_DIRS += $(COMPONENT_DIR)/Solaris
       
    46 PATH="/usr/gnu/bin:/usr/perl5/bin:/usr/bin:/usr/sbin"
       
    47 
       
    48 # Don't use SSE3 or SSSE3 on Intel, because it's not completely portable.
       
    49 # Do not tell GCC to assume strictly correct pointer aliasing. CLooG
       
    50 # employs casts from incompatible pointer types.
       
    51 # General-purpose SPARC incantations:
       
    52 # - build for UltraSPARC-III (use fp registers for int whenever possible)
       
    53 # - use VIS-2 Instructions whenever possible
       
    54 # - there are no misaligned doubles in this code
       
    55 # - don't do software float (we're not using quat-precision).
       
    56 CLOOG_GCC_ARCH_i386 = -mtune=opteron -march=opteron -mno-sse3 -mno-ssse3
       
    57 CLOOG_GCC_ARCH_i386 += -fno-omit-frame-pointer -fno-strict-aliasing
       
    58 CLOOG_GCC_ARCH_sparc = -mtune=ultrasparc3 -mcpu=ultrasparc3 -mvis2 -mhard-float
       
    59 CLOOG_GCC_ARCH_sparc += -fno-strict-aliasing -mno-unaligned-doubles
       
    60 CLOOG_GCC_ARCH = $(CLOOG_GCC_ARCH_$(MACH))
       
    61 CLOOG_GCC_ARCH += -Wall -Wextra -Wcast-qual -Wcast-align
       
    62 
       
    63 CFLAGS = $(CC_BITS)
       
    64 CFLAGS += -O2 -std=c99
       
    65 CFLAGS += -D__C99FEATURES__
       
    66 CFLAGS += -D_STDC_C99
       
    67 CFLAGS += $(CPP_XPG6MODE)
       
    68 CFLAGS += $(CLOOG_GCC_ARCH)
       
    69 CFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align
       
    70 
       
    71 CXXFLAGS = $(CC_BITS)
       
    72 CXXFLAGS += -O2 -std=c++03
       
    73 CXXFLAGS += $(CPP_XPG5MODE)
       
    74 CXXFLAGS += $(CLOOG_GCC_ARCH)
       
    75 CXXFLAGS += -Wall -Wextra -Wcast-qual -Wcast-align
       
    76 
       
    77 CPPFLAGS += $(CPP_LARGEFILES)
       
    78 CPPFLAGS += `pkg-config --cflags libgmp`
       
    79 CPPFLAGS += `pkg-config --cflags libmpfr`
       
    80 CPPFLAGS += `pkg-config --cflags isl`
       
    81 
       
    82 CONFIGURE_ENV +=	CFLAGS="$(CFLAGS)"
       
    83 CONFIGURE_ENV +=	CXXFLAGS="$(CXXFLAGS)"
       
    84 CONFIGURE_ENV +=	CPPFLAGS="$(CPPFLAGS)"
       
    85 CONFIGURE_ENV +=	LDFLAGS="$(LDFLAGS)"
       
    86 CONFIGURE_ENV +=	LD_OPTIONS="$(LD_OPTIONS)"
       
    87 CONFIGURE_ENV +=	CCLD="$(CC) $(CFLAGS) $(LDFLAGS)"
       
    88 CONFIGURE_ENV +=	LIBS="$(LIBS)"
       
    89 CONFIGURE_ENV +=	PATH="$(PATH)"
       
    90 
       
    91 COMPONENT_BUILD_ENV += LD_OPTIONS="$(LD_OPTIONS)"
       
    92 
       
    93 CONFIGURE_OPTIONS  +=		--localstatedir=/var
       
    94 CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
       
    95 CONFIGURE_OPTIONS  +=		--enable-shared
       
    96 CONFIGURE_OPTIONS  +=		--disable-silent-rules
       
    97 CONFIGURE_OPTIONS  +=		--disable-libtool-lock
       
    98 CONFIGURE_OPTIONS  +=		--with-gcc-arch="$(CLOOG_GCC_ARCH)"
       
    99 CONFIGURE_OPTIONS  +=		--with-isl=system
       
   100 CONFIGURE_OPTIONS  +=		--with-isl-prefix=$(CONFIGURE_PREFIX)
       
   101 CONFIGURE_OPTIONS  +=		--with-gmp=system
       
   102 CONFIGURE_OPTIONS  +=		--with-gmp-prefix=$(CONFIGURE_PREFIX)
       
   103 
       
   104 COMPONENT_POST_INSTALL_ACTION = \
       
   105   ( cd $(PROTOUSRDIR) ; \
       
   106     $(MKDIR) $(PROTOUSRLIBDIR)/pkgconfig ; \
       
   107     $(CP) $(COMPONENT_DIR)/Solaris/cloog-isl.pc \
       
   108       $(PROTOUSRLIBDIR)/pkgconfig/ ; \
       
   109     $(GSED) -i 's^LIBDIR^$(USRLIBDIR)^g' \
       
   110       $(PROTOUSRLIBDIR)/pkgconfig/cloog-isl.pc ; \
       
   111     $(MKDIR) $(PROTOUSRLIBDIR64)/pkgconfig ; \
       
   112     $(CP) $(COMPONENT_DIR)/Solaris/cloog-isl.pc \
       
   113       $(PROTOUSRLIBDIR64)/pkgconfig/ ; \
       
   114     $(GSED) -i 's^LIBDIR^$(USRLIBDIR64)^g' \
       
   115       $(PROTOUSRLIBDIR64)/pkgconfig/cloog-isl.pc )
       
   116 
       
   117 COMPONENT_TEST_ENV +=   libtool_install_magic='%%%MAGIC variable%%%'
       
   118 COMPONENT_TEST_ENV +=   libtool_execute_magic='%%%MAGIC variable%%%'
       
   119 COMPONENT_TEST_ENV +=	$(TEST_PATH)
       
   120 COMPONENT_TEST_ENV +=	$(TARGET_ENV)
       
   121 
       
   122 ASLR_MDOE=$(ASLR_NOT_APPLICABLE)
       
   123 
       
   124 COMPONENT_TEST_MASTER = \
       
   125         $(COMPONENT_TEST_RESULTS_DIR)/results-cloog.master
       
   126 
       
   127 COMPONENT_TEST_TRANSFORMS += \
       
   128      '-e "/libtool/d"' \
       
   129      '-e "/-m32/d"' \
       
   130      '-e "/-m64/d"' \
       
   131      '-e "/ld: warning/d"' \
       
   132      '-e "/warning/d"' \
       
   133      '-e "/prototype:/d"' \
       
   134      '-e "/argument/d"' \
       
   135      '-e "/Entering/d"' \
       
   136      '-e "/Leaving/d"' \
       
   137      '-e "/check-TESTS/d"' \
       
   138      '-e "/all-recursive/d"' \
       
   139      '-e "/Making all/d"' \
       
   140      '-e "/Making check/d"' \
       
   141      '-e "/gnu/d"' \
       
   142      '-e "/Nothing to be done/d"' \
       
   143      '-e "/is up to date/d"' \
       
   144      '-e "s/[0-9]\{1,\}\.[0-9]\{1,\} s, //g"' \
       
   145      '-e "s^[0-9]\{1,\} kB/s^^g"'  \
       
   146      '-e "s^[0-9]\{1,\}  kB/s^^g"'  \
       
   147      '-e "s^[0-9]\{1,\}\.[0-9]\{1,\}  MB/s^^g"' \
       
   148      '-e "s^[0-9]\{1,\}\.[0-9]\{1,\} MB/s^^g"' \
       
   149      '-e "s/([0-9]\{1,\} B)//g"' \
       
   150      '-e "s/([0-9]\{1,\}  B)//g"' \
       
   151      '-e "s/copied,/copied/g"'  \
       
   152      '-e "s/ \{1,\}copied/ copied/g"'  \
       
   153      '-e "s/copied $$/copied/g"'  \
       
   154      '-e "s/copied [0-9]\{1,\}\./copied/g"'
       
   155 
       
   156 build: $(BUILD_32_and_64)
       
   157 
       
   158 install: $(INSTALL_32_and_64)
       
   159 
       
   160 test: $(TEST_32_and_64)
       
   161 
       
   162 system-test:	$(SYSTEM_TESTS_NOT_IMPLEMENTED)
       
   163 
       
   164 REQUIRED_PACKAGES += library/gmp
       
   165 REQUIRED_PACKAGES += library/mpfr
       
   166 REQUIRED_PACKAGES += library/isl
       
   167 REQUIRED_PACKAGES += system/library
       
   168