From a90cc0c2165020badf17bb099e3beeab673cff2d Mon Sep 17 00:00:00 2001 From: zrj Date: Sat, 28 Oct 2017 17:25:31 +0300 Subject: [PATCH] bootstrap: Remove helpers for upgrading directly from pre 4.4 This is partly needed to smooth out transition between c++98 to c++14 without switching to a rapid release cycling. Many changes went in since 4.0 involving btools: gnu/usr.bin/cc50/cc_tools - iconv() c++ issue, pre 4.4 gnu/usr.bin/grep - max_align_t issue, pre 4.2 usr.bin/chflags - chflagsat(2), pre 4.2 usr.bin/gencat - locales, pre 3.6(4.1 for safety) usr.bin/sort - isnan(), pre 4.4 It is highly recomended to take an intermediate update step to any of 4.4, 4.6, 4.8 or 5.0 releases first when upgrading from older releases. --- UPDATING | 7 +++ gnu/usr.bin/cc50/cc_tools/libcpp/Makefile | 5 -- gnu/usr.bin/cc50/support-libs/libcpp/Makefile | 5 -- gnu/usr.bin/grep/Makefile.inc | 8 ---- usr.bin/chflags/Makefile | 7 --- usr.bin/chflags/chflags-compat.h | 67 --------------------------- usr.bin/gencat/Makefile | 30 +++--------- usr.bin/sort/Makefile | 3 -- usr.bin/sort/coll.c | 4 -- 9 files changed, 14 insertions(+), 122 deletions(-) delete mode 100644 usr.bin/chflags/chflags-compat.h rewrite usr.bin/gencat/Makefile (70%) diff --git a/UPDATING b/UPDATING index 3e9848f1ab..be085a6f54 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,13 @@ + UPGRADING DRAGONFLY FROM 5.0 TO LATER VERSIONS + +-----------------------------------------------------------------------+ +BOOTSTRAPPING LIMITED FROM PRE 4.4 +---------------------------------- + +Upgrading to 5.1 and later versions now require at least 4.4 in +preparations for upcoming base compilers updates. + + IF_PPP AND PPPD REMOVED ----------------------- diff --git a/gnu/usr.bin/cc50/cc_tools/libcpp/Makefile b/gnu/usr.bin/cc50/cc_tools/libcpp/Makefile index aab7d4269d..5d6d6abc9a 100644 --- a/gnu/usr.bin/cc50/cc_tools/libcpp/Makefile +++ b/gnu/usr.bin/cc50/cc_tools/libcpp/Makefile @@ -28,11 +28,6 @@ SRCS= charset.c \ symtab.c \ traditional.c -# Helper for bootstrapping over iconv() removal of 'const' (c++ issue) -.if ${WORLD_VERSION} <= 400301 -CFLAGS+= -fpermissive -.endif - localedir.h: touch $@ diff --git a/gnu/usr.bin/cc50/support-libs/libcpp/Makefile b/gnu/usr.bin/cc50/support-libs/libcpp/Makefile index c4b97fd0f1..588a927931 100644 --- a/gnu/usr.bin/cc50/support-libs/libcpp/Makefile +++ b/gnu/usr.bin/cc50/support-libs/libcpp/Makefile @@ -27,11 +27,6 @@ CXX_BUILD= charset.c \ OBJS= ${CXX_BUILD:.c=.o} -# Helper for bootstrapping over iconv() removal of 'const' (c++ issue) -.if ${WORLD_VERSION} <= 400301 -CFLAGS+= -fpermissive -.endif - # hack to force c++ compiler to compile *.c files to create library .for cfile in ${CXX_BUILD} ${cfile:.c=.o}: ${cfile} localedir.h diff --git a/gnu/usr.bin/grep/Makefile.inc b/gnu/usr.bin/grep/Makefile.inc index c4fe828627..c50f87cc4b 100644 --- a/gnu/usr.bin/grep/Makefile.inc +++ b/gnu/usr.bin/grep/Makefile.inc @@ -1,11 +1,3 @@ BASEDIR= ${.CURDIR}/${RELATIVE}../../../../contrib/grep -.if defined(BOOTSTRAPPING) -CFLAGS+= -DBOOTSTRAPPING -# Helper for bootstrapping over C++11 features. -. if ${WORLD_VERSION} <= 400103 -CFLAGS+= -Dmax_align_t="long double" -. endif -.endif - CSTD= c11 diff --git a/usr.bin/chflags/Makefile b/usr.bin/chflags/Makefile index af7c1ed8e2..746aadee80 100644 --- a/usr.bin/chflags/Makefile +++ b/usr.bin/chflags/Makefile @@ -5,11 +5,4 @@ NOSHARED?=yes PROG= chflags -.if defined(BOOTSTRAPPING) -# Keep version check up to date. -. if ${WORLD_VERSION} <= 400103 -CFLAGS+= -I${.CURDIR} -include chflags-compat.h -. endif -.endif - .include diff --git a/usr.bin/chflags/chflags-compat.h b/usr.bin/chflags/chflags-compat.h deleted file mode 100644 index f6f12052a1..0000000000 --- a/usr.bin/chflags/chflags-compat.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016 The DragonFly Project. All rights reserved. - * - * This code is derived from software contributed to The DragonFly Project - * by Matthew Dillon - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name of The DragonFly Project nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific, prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _CHFLAGS_COMPAT_H_ -#define _CHFLAGS_COMPAT_H_ - -#include -#include -#include -#include -#include -#include - -/* - * Keep bootstrapping workarounds based on version checks! - */ - -#if __DragonFly_version < 400104 /* buildworld bootstrap only */ - -static __inline int -chflagsat(int atfdcwd, const char *path, u_long flags, int atflags) -{ - int rv; - - assert(atfdcwd == (int)AT_FDCWD); - if (atflags == AT_SYMLINK_NOFOLLOW) { - rv = lchflags(path, flags); - } else { - rv = chflags(path, flags); - } - return rv; -} - -#endif - -#endif /* !_CHFLAGS_COMPAT_H_ */ diff --git a/usr.bin/gencat/Makefile b/usr.bin/gencat/Makefile dissimilarity index 70% index d5d217827f..6111ab4265 100644 --- a/usr.bin/gencat/Makefile +++ b/usr.bin/gencat/Makefile @@ -1,23 +1,7 @@ -# $FreeBSD: src/usr.bin/gencat/Makefile,v 1.5 1999/08/28 01:01:40 peter Exp $ - -PROG= gencat -SRCS= gencat.c -WARNS?= 2 - -.if defined(BOOTSTRAPPING) -. if ${WORLD_VERSION} <= 400103 -nl_types.h: ../../include/nl_types.h - cp ${.CURDIR}/../../include/nl_types.h ${.TARGET} - -types.h: ${.CURDIR}/../../sys/sys/types.h - mkdir sys - cp ${.ALLSRC} sys/${.TARGET} - -SRCS+= nl_types.h types.h -CFLAGS+= -I${.OBJDIR} -CLEANFILES+= nl_types.h -CLEANDIRS+= sys -. endif -.endif - -.include +# $FreeBSD: src/usr.bin/gencat/Makefile,v 1.5 1999/08/28 01:01:40 peter Exp $ + +PROG= gencat +SRCS= gencat.c +WARNS?= 2 + +.include diff --git a/usr.bin/sort/Makefile b/usr.bin/sort/Makefile index 6f3d3611a6..663f6cc21e 100644 --- a/usr.bin/sort/Makefile +++ b/usr.bin/sort/Makefile @@ -16,9 +16,6 @@ DPADD+= ${LIBPTHREAD} LDADD+= -lpthread CFLAGS+= -DSORT_THREADS CFLAGS+= -DWITHOUT_NLS -.if defined(BOOTSTRAPPING) -CFLAGS+= -DBOOTSTRAPPING -.endif # XXX sys/md5.h shim errata for bootstrap REMOVE_OPENSSL_FILES CFLAGS+= -I${_SHLIBDIRPREFIX}/usr/include/priv diff --git a/usr.bin/sort/coll.c b/usr.bin/sort/coll.c index 8a74caf094..1edb9333e0 100644 --- a/usr.bin/sort/coll.c +++ b/usr.bin/sort/coll.c @@ -1074,11 +1074,7 @@ huge_plus(double d, int err1) static bool is_nan(double d) { -#ifdef BOOTSTRAPPING - return (d == NAN); -#else return ((d == NAN) || (isnan(d))); -#endif } /* -- 2.11.4.GIT