From patchwork Thu Jul 4 22:23:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 2337 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id 4F3CF887E52 for ; Thu, 4 Jul 2019 13:23:27 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 45fcZk625zz5VVTK; Thu, 4 Jul 2019 13:23:26 +0100 (BST) Received: from tuxedo.stevee (212095005025.public.telering.at [212.95.5.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 45fcZX5Q38z5G6fq; Thu, 4 Jul 2019 13:23:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904rsa; t=1562242997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6ARsQBNsgI5ehhZmBMcqel6lEeXJC6uSdSEfaPaeAgc=; b=NnwPwncx/wI9RUdiaAiD7h5WgAJ8xt+knR910BWGGGnTQV4gy1G+mkJkNK/7/m1KOe7bvb 2uKld/ZXvEvEiBJ6MOFOe7BGTYwjwM0P8lK/1GNi5EZgMWZzRwRhkf2+La8no/JURVNGXH 0NZmZYE2ye/ZEAodPTcSVqhlv4aK5t6Od6LQXZE0tE6YODaljmSGVM5xxBGumcJ43Rm4Nr fAv9r02t1GH7W1R22dwDK4MZtJEDCt4oxrF0PxdvLXCHjGzE3KPQpCXYMpk49znc4Um1sQ 85hMG0Md4LIyxTSECXzyjwgNziZ+dfFurgNlLYXUALBrhANe36InEbN3QpMsaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904ed25519; t=1562242997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6ARsQBNsgI5ehhZmBMcqel6lEeXJC6uSdSEfaPaeAgc=; b=MvhPJDBye1vuVd1L4HUO1G/uV5GVXDNFwK8k/6t8wQXhGvxMsWtpqB8fa8zjDefNRfS16F LLWeAnoPAvYcwVDg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 3/3] llvm: New package Date: Thu, 4 Jul 2019 14:23:12 +0200 Message-Id: <20190704122312.9655-3-stefan.schantl@ipfire.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190704122312.9655-1-stefan.schantl@ipfire.org> References: <20190704122312.9655-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=stevee smtp.mailfrom=stefan.schantl@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Stefan Schantl --- llvm/llvm.nm | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 llvm/llvm.nm diff --git a/llvm/llvm.nm b/llvm/llvm.nm new file mode 100644 index 000000000..7e89256d3 --- /dev/null +++ b/llvm/llvm.nm @@ -0,0 +1,113 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team # +############################################################################### + +name = llvm +version = 8.0.0 +release = 1 + +groups = Applications/System +url = http://llvm.org +license = NCSA +summary = The Low Level Virtual Machine. + +description + LLVM is a compiler infrastructure designed for compile-time, link-time, + runtime, and idle-time optimization of programs from arbitrary programming + languages. The compiler infrastructure includes mirror sets of programming + tools as well as libraries with equivalent functionality. +end + +source_dl = http://releases.llvm.org/%{version}/ +sources = %{thisapp}.src.tar.xz + +build + requires + binutils >= 2.32 + cmake >= 3.14.5 + gcc + gcc-c++ + libedit-devel 3.1-20190324 + libffi-devel + libxml2-devel + zlib-devel + end + + DIR_APP = %{DIR_SRC}/%{thisapp}.src + + # Limit parallelization to only 2 jobs at the same time. + PARALLELISMFLAGS = -j2 + + # Set suffix for libdir based on the build architecture. + llvm_libdir_suffix = + + if "%{DISTRO_ARCH}" == "x86_64" + llvm_libdir_suffix = 64 + end + + if "%{DISTRO_ARCH}" == "aarch64" + llvm_libdir_suffix = 64 + end + + build + # Create and switch into build directory. + mkdir -pv %{DIR_APP}/build + cd %{DIR_APP}/build + + %{cmake} .. \ + -DLLVM_BUILD_TOOLS=ON \ + -DLLVM_BUILD_UTILS=ON \ + -DLLVM_BUILD_TESTS=OFF \ + -DLLVM_BUILD_EXAMPLES=OFF \ + -DLLVM_BUILD_BENCHMARKS=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_RPATH=";" \ + -DLLVM_BUILD_LLVM_DYLIB=OFF \ + -DLLVM_LINK_LLVM_DYLIB=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DLLVM_ENABLE_FFI=ON \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_ENABLE_LIBCXX=OFF \ + -DLLVM_TARGETS_TO_BUILD="host;" \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{CFLAGS}" \ + -DCMAKE_EXE_LINKER_FLAGS="%{LDFLAGS}" \ + -DENABLE_PIC=1 \ + -DLLVM_PARALLEL_LINK_JOBS=1 \ + -DLLVM_ENABLE_DUMP=ON \ + -DLLVM_LIBDIR_SUFFIX=%{llvm_libdir_suffix} \ + -Wno-dev + + make %{PARALELLISMFLAGS} + end + + test + cd %{DIR_APP}/build + + make check-all %{PARALELLISMFLAGS} + end + + install + cd %{DIR_APP}/build + + make install DESTDIR=%{BUILDROOT} + end +end + +packages + package llvm + + package llvm-libs + template LIBS + end + + package llvm-devel + template DEVEL + end + + package %{name}-debuginfo + template DEBUGINFO + end +end