From patchwork Thu May 24 21:36:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Pfeifer X-Patchwork-Id: 920108 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-478437-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=pfeifer.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Vo6qvoxk"; dkim-atps=neutral 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 40sN4r00CMz9ry1 for ; Fri, 25 May 2018 07:36:59 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=DiZIbLi4rqx8Kke3dLOW46V4BrN68CtD5+FCag4EjUXzgZiS7tRFh +turQUd1Zz3RzHVWEI8BwcmiOKsJeNuzKE3A1PVYPJbqYCWN9kjlVMEL0XQBdNBm bUDCYDVUCZaYpvegpR7/6STFX+46hhZhk8krZJXU2ygJAtqa1pVvZ8= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=ssok9gwLcq9r4xZWX4UZKhPEfqw=; b=Vo6qvoxkDrt8DZfA2345 1pzkRr9a18AswEefGj4H1AnOx3QFsJKLd45XUKs0AOnqX1eLufXhyr6JxeRY28rh uRC2sGr9DwqiNuxnU4mWZzgU5YAiAtMWiC3ePmgS8LQeQX7VgjOH0qUCjL4goalE d8pO51oXxkm54nTyLpRoSuo= Received: (qmail 46542 invoked by alias); 24 May 2018 21:36:48 -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 46452 invoked by uid 89); 24 May 2018 21:36:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=consulting, HTo:U*andreast, H*Ad:U*andreast, pfeifer X-HELO: ainaz.pair.com Received: from ainaz.pair.com (HELO ainaz.pair.com) (209.68.2.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 May 2018 21:36:45 +0000 Received: from ainaz.pair.com (localhost [127.0.0.1]) by ainaz.pair.com (Postfix) with ESMTP id EEC9D3F4A7; Thu, 24 May 2018 17:36:43 -0400 (EDT) Received: from anthias.microfocus.com (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ainaz.pair.com (Postfix) with ESMTPSA id 7BBE63F423; Thu, 24 May 2018 17:36:43 -0400 (EDT) Date: Thu, 24 May 2018 23:36:41 +0200 (CEST) From: Gerald Pfeifer To: gcc-patches@gcc.gnu.org, Andreas Tobler Subject: Remove support for FreeBSD 4.x (and earlier) Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes FreeBSD 5.0 was released in January of 2003, and FreeBSD 4.11, the last on that branch in January of 2005, so it appears time to remove support for anything older than FreeBSD 5.x, if for no other reason to simplify things a bit. This simplifies the spec file a fair bit, and I would not be surprised for even FreeBSD 5.x not to really work any longer. On the way, move a now no longer relevant comment where it is still applicable. What do you think? (Let me know if you'd like me to keep the first sentence of the original comment.) Gerald 2018-05-24 Gerald Pfeifer * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5 and later. Index: gcc/config/freebsd-spec.h =================================================================== --- gcc/config/freebsd-spec.h (revision 260690) +++ gcc/config/freebsd-spec.h (working copy) @@ -79,15 +79,9 @@ #define FBSD_ENDFILE_SPEC \ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" -/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as - required by the user-land thread model. Before __FreeBSD_version - 500016, select the appropriate libc, depending on whether we're - doing profiling or need threads support. At __FreeBSD_version - 500016 and later, when threads support is requested include both - -lc and the threading lib instead of only -lc_r. To make matters - interesting, we can't actually use __FreeBSD_version provided by - directly since it breaks cross-compiling. As a final - twist, make it a hard error if -pthread is provided on the command +/* When threads support is requested (assuming FreeBSD 5.x and later) + include both -lc and the threading lib. + And make it a hard error if -pthread is provided on the command line and gcc was configured with --disable-threads (this will help avoid bug reports from users complaining about threading when they misconfigured the gcc bootstrap but are later consulting FreeBSD @@ -106,19 +100,8 @@ %{pg: -lc_p} \ }" #else -#if FBSD_MAJOR < 5 #define FBSD_LIB_SPEC " \ %{!shared: \ - %{!pg: \ - %{!pthread:-lc} \ - %{pthread:-lc_r}} \ - %{pg: \ - %{!pthread:-lc_p} \ - %{pthread:-lc_r_p}} \ - }" -#else -#define FBSD_LIB_SPEC " \ - %{!shared: \ %{!pg: %{pthread:-lpthread} -lc} \ %{pg: %{pthread:-lpthread_p} -lc_p} \ } \ @@ -126,8 +109,10 @@ %{pthread:-lpthread} -lc \ }" #endif -#endif +/* To make matters interesting, we can't actually use __FreeBSD_version + provided by directly since it breaks cross-compiling. */ + #if FBSD_MAJOR < 6 #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1" #else