From patchwork Sun Feb 25 18:39:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 1903966 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=anbwLNpD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TjXcl3DTWz23cb for ; Mon, 26 Feb 2024 05:40:39 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63FEB3858287 for ; Sun, 25 Feb 2024 18:40:37 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E60BB3858D1E for ; Sun, 25 Feb 2024 18:40:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E60BB3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E60BB3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708886416; cv=none; b=C0+psyqphTU2Al/FgdkBv9Zkj6BubiIWCHK6jbbsdFYp+pWRxUqqTRrD6KktEOCCymjSoga92iBlc61UceHlxiDTm64N+ACoNHzCsAi84vgEJznHATW5Zt9k5qBmkREw+vfyIsEELqQ+e/J+ElmF+WHYsXxESfrY7Oe9ejP57eQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708886416; c=relaxed/simple; bh=oojYM2x7s3IMdSBtvGNvVNlPq/iAU+W2oFhaH6T0bsg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KxNdHBjS+GEdZ6b8D9I05v9ls7xu6bKRyPdYWvV3O4lzGAFHMnTs5jQskHF+odyC+VG3iZahTOvZQxR8fDrHobUtts5aCylTiNnx8AjPF5Cjsk4eYciaFLAJaxM0FAl/qAHzeBpkwDP1PrC/qOkeZ2bLYRn2NASsGI4tmAUHtd4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708886414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v7wQ//V4rGFdSHlBT0L9db39FX+BjIsQzCEvAyzPrks=; b=anbwLNpDSdS1gmIiIUP4MWEzlE6aQM8s6eKJ9DOuX4M+rOVG97sLetoh7+8GxhS7p1Wwmk 5HJbRAcoAusGTg6CP5NTccmhBdwBHGJN90BCnfJpdD05hGLnHVMgGqwlvPeUNoeRknhjN5 G9D3qjH90EJRalzYZfArW26HEx/NOo0= Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-620-r8yzw8umOyODP1sc-1CiAA-1; Sun, 25 Feb 2024 13:40:13 -0500 X-MC-Unique: r8yzw8umOyODP1sc-1CiAA-1 Received: by mail-oi1-f198.google.com with SMTP id 5614622812f47-3c031a2debdso2797959b6e.2 for ; Sun, 25 Feb 2024 10:40:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708886412; x=1709491212; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v7wQ//V4rGFdSHlBT0L9db39FX+BjIsQzCEvAyzPrks=; b=e4pb2kRQHt4UNbeTm/vnsUM2LWRJzy1Hq0y2lTStSXjAWCfJewq6G7DB/w2Cnea7Qx 4BR8rp9VQKIVZHECv80EqoY4QP/kcTaGApENzIDQ7e6ily0/UVhgJzVNrTOBuBzp2EYh OEWVWXQQLq87cCQM70iMGQyaCQhRRVWRBdyIY9S3/k2ktj/Zt4/WfwIKbRhVaeT6Gzjs FR290kxavjvJ7jT4P5Kq4uxHee2WwH7l0KX3gHXy/aipEs+NpDyDjCGn/R+EwMr6mKsp WWwfB/BkgfH/P6JU+zx3DFJG6rN3xcbJEgJiNqFVQNhG7b1LWyeAUJX1HFMkOntxigj6 LH2A== X-Gm-Message-State: AOJu0Yxyauj7pJVdkwMjs5VigJHcVzueM8/DKSGGSn1A3H2S/yM8JNR3 6Yp9IAqXnXjQB73ZbHDK0iKPT9Eb5Xhjf9jJwEBQhCltP90hKNf8eMi5sVHMhAK/2NPPHMml5x9 REOG6wneA/2lK33adcN6l7RVDZ0GVae4/EiodvyXnbybeOro9f6cpT+dYeFBRxtK4KcQyVk+bDu J0FBv/lmAERMrjK1Fq3kAb6cJVg7AkHVnybay158Y= X-Received: by 2002:a05:6808:188f:b0:3c1:5c16:71bd with SMTP id bi15-20020a056808188f00b003c15c1671bdmr7527700oib.43.1708886411967; Sun, 25 Feb 2024 10:40:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvVxMLJMPxvDY1m6d9LgxN8l36ssD+OMwnTxZtK2WoFHhnVO1Ae8Er90cGiRuxT2F2oi2zJw== X-Received: by 2002:a05:6808:188f:b0:3c1:5c16:71bd with SMTP id bi15-20020a056808188f00b003c15c1671bdmr7527681oib.43.1708886411653; Sun, 25 Feb 2024 10:40:11 -0800 (PST) Received: from localhost.localdomain ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id y8-20020ac87088000000b0042e6ad88de0sm1643975qto.73.2024.02.25.10.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 10:40:11 -0800 (PST) From: Carlos O'Donell To: libc-alpha@sourceware.org Cc: Carlos O'Donell Subject: [COMMITTED 02/10] csu: Reformat Makefile. Date: Sun, 25 Feb 2024 13:39:41 -0500 Message-ID: <20240225183956.2534939-2-carlos@redhat.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240225183956.2534939-1-carlos@redhat.com> References: <20240225183956.2534939-1-carlos@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Reflow and sort Makefile. Code generation changes present due to link order changes. No regressions on x86_64 and i686. --- csu/Makefile | 74 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 15 deletions(-) diff --git a/csu/Makefile b/csu/Makefile index ac05ab24d5..946fd91031 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -26,20 +26,36 @@ subdir := csu include ../Makeconfig -routines = init-first libc-start $(libc-init) sysdep version check_fds \ - libc-tls dso_handle +routines = \ + $(libc-init) \ + check_fds \ + dso_handle \ + init-first \ + libc-start \ + libc-tls \ + sysdep \ + version \ + # routines aux = errno elide-routines.os = libc-tls csu-dummies = $(filter-out $(start-installed-name),crt1.o Mcrt1.o) -extra-objs = start.o \ - $(start-installed-name) g$(start-installed-name) $(csu-dummies) \ - S$(start-installed-name) +extra-objs = \ + $(csu-dummies) \ + $(start-installed-name) \ + S$(start-installed-name) \ + g$(start-installed-name) \ + start.o \ + # extra-objs omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \ b$(start-installed-name) $(csu-dummies) \ S$(start-installed-name) \ r$(start-installed-name) \ gr$(start-installed-name)) -install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies) +install-lib = \ + $(csu-dummies) \ + $(start-installed-name) \ + g$(start-installed-name) \ + # install-lib # No tests are allowed in the csu/ subdirectory because the startup # code is compiled with special flags. @@ -67,7 +83,10 @@ CFLAGS-.os += $(call elide-stack-protector,.os,$(filter-out \ $(routines) $(extra-no-ssp))) ifeq (yes,$(build-shared)) -extra-objs += S$(start-installed-name) gmon-start.os +extra-objs += \ + S$(start-installed-name) \ + gmon-start.os \ + # extra-objs ifneq ($(start-installed-name),$(static-start-installed-name)) extra-objs += gmon-start.o endif @@ -78,20 +97,38 @@ extra-objs += gmon-start.o endif ifeq (yes,$(enable-static-pie)) -extra-objs += r$(start-installed-name) gr$(start-installed-name) -install-lib += r$(start-installed-name) gr$(start-installed-name) +extra-objs += \ + gr$(start-installed-name) \ + r$(start-installed-name) \ + # extra-objs +install-lib += \ + gr$(start-installed-name) \ + r$(start-installed-name) \ + # install-lib endif ifneq ($(start-installed-name),$(static-start-installed-name)) -extra-objs += $(static-start-installed-name) g$(static-start-installed-name) +extra-objs += \ + $(static-start-installed-name) \ + g$(static-start-installed-name) \ + # extra-objs omit-deps += $(patsubst %.o,%,$(static-start-installed-name) \ g$(static-start-installed-name)) -install-lib += $(static-start-installed-name) g$(static-start-installed-name) +install-lib += \ + $(static-start-installed-name) \ + g$(static-start-installed-name) \ + # install-lib ifeq (yes,$(enable-static-pie)) -extra-objs += r$(static-start-installed-name) gr$(static-start-installed-name) +extra-objs += \ + gr$(static-start-installed-name) \ + r$(static-start-installed-name) \ + # extra-objs omit-deps += $(patsubst %.o,%,r$(static-start-installed-name) \ gr$(static-start-installed-name)) -install-lib += r$(static-start-installed-name) gr$(static-start-installed-name) +install-lib += \ + gr$(static-start-installed-name) \ + r$(static-start-installed-name) \ + # install-lib endif endif @@ -104,7 +141,10 @@ gen-as-const-headers += rtld-sizes.sym # These are the special initializer/finalizer files. They are always the # first and last file in the link. crti.o ... crtn.o define the global # "functions" _init and _fini to run the .init and .fini sections. -crtstuff = crti crtn +crtstuff = \ + crti \ + crtn \ + # crtstuff install-lib += $(crtstuff:=.o) extra-objs += $(crtstuff:=.o) @@ -114,7 +154,11 @@ multilib-extra-objs = $(addprefix $(multidir)/, $(install-lib)) extra-objs += $(multilib-extra-objs) endif -extra-objs += abi-note.o init.o static-reloc.o +extra-objs += \ + abi-note.o \ + init.o \ + static-reloc.o \ + # extra-objs ifeq (yes,$(build-shared)) extra-objs += static-reloc.os endif