From patchwork Wed May 7 19:25:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 346778 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 108771401A8 for ; Thu, 8 May 2014 05:23:13 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=E1loA1kPay0B kDjnRmKGJevBuk9q84Rrh+h9Sa5k9HL7na409tkfppUmZfLlR9c7sUr6r8V0XAtD k4GAJ/swFmZWpXJt0m0Vwk1Eep6ensGMTybyVBumjsCiHSk66qmLZqxeP3l2NU51 mZNCimgovJBGZxBZKo/lzqw9Mn5/m8g= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=CI+WMiMzZ8vobHBva9 LTXuKeRbI=; b=KKjeL2pMfO+aXDH4m1dJ9Y0YExPs5gj2OBMxmmmo9w0gSC8VSD h57XvXIqqFXRdDIxf8QFsyZOSkwbY9/3KpBmlYuT7YxTOTbk1PND+EZcDngwpdbh dTDzjc3II6ILUgxfMkNoSTG0Vo41SfBgPWZi7RqSv6Z8FZt84gBZIF/ls= Received: (qmail 26984 invoked by alias); 7 May 2014 19:23:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 26951 invoked by uid 89); 7 May 2014 19:23:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 May 2014 19:23:02 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s47JN1T0028595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 May 2014 15:23:01 -0400 Received: from c64.redhat.com (vpn-227-201.phx2.redhat.com [10.3.227.201]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s47JN0oI000559; Wed, 7 May 2014 15:23:01 -0400 From: David Malcolm To: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [jit] Add a soname Date: Wed, 7 May 2014 15:25:44 -0400 Message-Id: <1399490744-15090-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes gcc/jit/ * Make-lang.in (LIBGCCJIT_LINKER_NAME): New. (LIBGCCJIT_VERSION_NUM): New. (LIBGCCJIT_MINOR_NUM): New. (LIBGCCJIT_RELEASE_NUM): New. (LIBGCCJIT_SONAME): New. (LIBGCCJIT_FILENAME): New. (LIBGCCJIT_LINKER_NAME_SYMLINK): New. (LIBGCCJIT_SONAME_SYMLINK): New. (jit): Add symlink targets. (libgccjit.so): Convert to... (LIBGCCJIT_FILENAME): ...and add a soname. (jit.install-common): Install the library with a soname, and symlinks. Install libgccjit++.h. --- gcc/jit/ChangeLog.jit | 16 ++++++++++++++++ gcc/jit/Make-lang.in | 38 +++++++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/gcc/jit/ChangeLog.jit b/gcc/jit/ChangeLog.jit index ccf8a10..f5c4742 100644 --- a/gcc/jit/ChangeLog.jit +++ b/gcc/jit/ChangeLog.jit @@ -1,3 +1,19 @@ +2014-05-07 David Malcolm + + * Make-lang.in (LIBGCCJIT_LINKER_NAME): New. + (LIBGCCJIT_VERSION_NUM): New. + (LIBGCCJIT_MINOR_NUM): New. + (LIBGCCJIT_RELEASE_NUM): New. + (LIBGCCJIT_SONAME): New. + (LIBGCCJIT_FILENAME): New. + (LIBGCCJIT_LINKER_NAME_SYMLINK): New. + (LIBGCCJIT_SONAME_SYMLINK): New. + (jit): Add symlink targets. + (libgccjit.so): Convert to... + (LIBGCCJIT_FILENAME): ...and add a soname. + (jit.install-common): Install the library with a soname, and + symlinks. Install libgccjit++.h. + 2014-04-25 David Malcolm * internal-api.c (gcc::jit::playback::context::compile): Put diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in index 776ee81..ce0cdc5 100644 --- a/gcc/jit/Make-lang.in +++ b/gcc/jit/Make-lang.in @@ -40,7 +40,18 @@ # into the jit rule, but that needs a little bit of work # to do the right thing within all.cross. -jit: libgccjit.so +LIBGCCJIT_LINKER_NAME = libgccjit.so +LIBGCCJIT_VERSION_NUM = 0 +LIBGCCJIT_MINOR_NUM = 0 +LIBGCCJIT_RELEASE_NUM = 1 +LIBGCCJIT_SONAME = $(LIBGCCJIT_LINKER_NAME).$(LIBGCCJIT_VERSION_NUM) +LIBGCCJIT_FILENAME = \ + $(LIBGCCJIT_SONAME).$(LIBGCCJIT_MINOR_NUM).$(LIBGCCJIT_RELEASE_NUM) + +LIBGCCJIT_LINKER_NAME_SYMLINK = $(LIBGCCJIT_LINKER_NAME) +LIBGCCJIT_SONAME_SYMLINK = $(LIBGCCJIT_SONAME) + +jit: $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SYMLINK) $(LIBGCCJIT_LINKER_NAME_SYMLINK) # Tell GNU make to ignore these if they exist. .PHONY: jit @@ -53,14 +64,21 @@ jit-warn = $(STRICT_WARN) # We avoid using $(BACKEND) from Makefile.in in order to avoid pulling # in main.o -libgccjit.so: $(jit_OBJS) \ +$(LIBGCCJIT_FILENAME): $(jit_OBJS) \ libbackend.a libcommon-target.a libcommon.a \ $(CPPLIB) $(LIBDECNUMBER) \ $(LIBDEPS) $(srcdir)/jit/libgccjit.map +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ -shared \ $(jit_OBJS) libbackend.a libcommon-target.a libcommon.a \ $(CPPLIB) $(LIBDECNUMBER) $(LIBS) $(BACKENDLIBS) \ - -Wl,--version-script=$(srcdir)/jit/libgccjit.map + -Wl,--version-script=$(srcdir)/jit/libgccjit.map \ + -Wl,-soname,$(LIBGCCJIT_SONAME) + +$(LIBGCCJIT_SONAME_SYMLINK): $(LIBGCCJIT_FILENAME) + ln -sf $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SONAME_SYMLINK) + +$(LIBGCCJIT_LINKER_NAME_SYMLINK): $(LIBGCCJIT_SONAME_SYMLINK) + ln -sf $(LIBGCCJIT_SONAME_SYMLINK) $(LIBGCCJIT_LINKER_NAME_SYMLINK) # # Build hooks: @@ -87,8 +105,18 @@ jit.srcman: # # Install hooks: jit.install-common: installdirs - $(INSTALL_PROGRAM) libgccjit.so $(DESTDIR)/$(libdir)/libgccjit.so - $(INSTALL_PROGRAM) $(srcdir)/jit/libgccjit.h $(DESTDIR)/$(includedir)/libgccjit.h + $(INSTALL_PROGRAM) $(LIBGCCJIT_FILENAME) \ + $(DESTDIR)/$(libdir)/$(LIBGCCJIT_FILENAME) + ln -sf \ + $(LIBGCCJIT_FILENAME) \ + $(DESTDIR)/$(libdir)/$(LIBGCCJIT_SONAME_SYMLINK) + ln -sf \ + $(LIBGCCJIT_SONAME_SYMLINK)\ + $(DESTDIR)/$(libdir)/$(LIBGCCJIT_LINKER_NAME_SYMLINK) + $(INSTALL_PROGRAM) $(srcdir)/jit/libgccjit.h \ + $(DESTDIR)/$(includedir)/libgccjit.h + $(INSTALL_PROGRAM) $(srcdir)/jit/libgccjit++.h \ + $(DESTDIR)/$(includedir)/libgccjit++.h jit.install-man: