From patchwork Mon Mar 15 21:01:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Seo X-Patchwork-Id: 42563 X-Patchwork-Delegate: szabolcs.nagy@arm.com Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B621D3858034; Mon, 15 Mar 2021 21:01:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B621D3858034 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1615842071; bh=/v4j8KL+NYOmTg6qjX1nlTqDHX+hUSM0ve8xZ2IMYsc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=goY/mBLnBbckbRAudlFO2ReeIhKBh0beeaNLtkgfs42YjG3b/NajljmruN+bjx780 hJf2tGHFJYd4RAZRH7qf/BnUXWoKFMUhrCZm/2hu5z9q9+kzlJ/P/Z49iNX7leY7Ax fJUqmMZ5APYSKox0d9Lwel8gq8U1ASQlT7xW9Pxw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by sourceware.org (Postfix) with ESMTPS id 7FF833858C27 for ; Mon, 15 Mar 2021 21:01:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7FF833858C27 Received: by mail-qt1-x830.google.com with SMTP id s2so10187979qtx.10 for ; Mon, 15 Mar 2021 14:01:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=/v4j8KL+NYOmTg6qjX1nlTqDHX+hUSM0ve8xZ2IMYsc=; b=j12b2kdZ2OMpp1qc1sdpAiDD95fqxCgV2CdooTBim9Ur/15LXvp2D1u3svZec4Fmpr BxHBUMdVNseIIDvqH9/mkytGi61Xxtc8A/buoO/RmzGPKp65wAjEn8esHeExmqWY8MbO 0Egk48Mhh6CNPl7T7EMxbsu6E/jivSqR2pDzEp/hXMdLf2j3Flq8EPiwVF/iwDJsJc06 Bn1Km8/hTqb6KI8vw4xQfqMXqY4/8aD8nFZcVHBvs7flXO+4x+MxvEeUG1QRF37HvNbT OxTljPFSaZkOCqvTKgKs5Y8STtaVndE3Y8F7m71EFEaOlFd7AGdF8Ers2TfYtqlbLeC+ XU4Q== X-Gm-Message-State: AOAM531W+9R2x7NEe3LhlUv6gMSDNyExDUY1z9tOu05nzUTnpiyNX2Ti W/tCYz2SEZSlS5QpH16J/hzFApCNgDvgtoad X-Google-Smtp-Source: ABdhPJzpXKUQ0itAe3jGUC18UDAm6GQtZpFSIOMyxSMmtRJ4Ty7MPNm1bLXu0N3BsS3de318/9JvSQ== X-Received: by 2002:ac8:690e:: with SMTP id e14mr24144830qtr.273.1615842068739; Mon, 15 Mar 2021 14:01:08 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:31:80a8:3137:d62b:80f0:3129]) by smtp.gmail.com with ESMTPSA id q24sm12181971qki.120.2021.03.15.14.01.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 14:01:08 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] elf: unconditionally add dl-static to sysdep-dl-routines in Makefile Date: Mon, 15 Mar 2021 18:01:03 -0300 Message-Id: <20210315210103.3040700-1-carlos.seo@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Carlos Eduardo Seo via Libc-alpha From: Carlos Seo Reply-To: Carlos Eduardo Seo Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Building dl-static is also needed when building glibc with --disable-shared. Tested on aarch64-linux-gnu and powerpc64le-linux-gnu. Reviewed-by: Szabolcs Nagy --- sysdeps/unix/sysv/linux/aarch64/Makefile | 2 -- sysdeps/unix/sysv/linux/arc/Makefile | 2 -- sysdeps/unix/sysv/linux/mips/Makefile | 2 -- sysdeps/unix/sysv/linux/powerpc/Makefile | 2 -- 4 files changed, 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/Makefile b/sysdeps/unix/sysv/linux/aarch64/Makefile index 3f22f71bef..41b284df17 100644 --- a/sysdeps/unix/sysv/linux/aarch64/Makefile +++ b/sysdeps/unix/sysv/linux/aarch64/Makefile @@ -1,9 +1,7 @@ ifeq ($(subdir),elf) -ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static endif -endif ifeq ($(subdir),misc) sysdep_headers += sys/elf.h diff --git a/sysdeps/unix/sysv/linux/arc/Makefile b/sysdeps/unix/sysv/linux/arc/Makefile index 25d7bbecac..4a49f34088 100644 --- a/sysdeps/unix/sysv/linux/arc/Makefile +++ b/sysdeps/unix/sysv/linux/arc/Makefile @@ -13,11 +13,9 @@ sysdep_routines += cacheflush endif ifeq ($(subdir),elf) -ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static endif -endif abi-variants := arcle arcbe diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index 026ba242cf..805dd59bab 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -57,10 +57,8 @@ abi-n64_hard_2008-condition := defined(__mips_nan2008) \ && (_MIPS_SIM == _MIPS_SIM_ABI64) ifeq ($(subdir),elf) -ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static -endif # If the compiler doesn't use GNU.stack note, # this test is expected to fail. ifneq ($(mips-has-gnustack),yes) diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile index a093cda68b..c567d6782a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -13,10 +13,8 @@ gen-as-const-headers += ucontext_i.sym endif ifeq ($(subdir),elf) -ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static -endif # Otherwise tst-tls-dlinfo fails due to tst-tlsmod2.so using static tls. LDFLAGS-tst-tlsmod2.so += -Wl,--no-tls-get-addr-optimize endif