All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Ayrton Leyssens <aleyssens@idtech.be>
Cc: "buildroot@buildroot.org" <buildroot@buildroot.org>,
	Gilles Fouarge <gfouarge@idtech.be>
Subject: Re: [Buildroot] [PATCH 1/1] package/libnss fix buildtype
Date: Wed, 23 Apr 2025 23:48:23 +0200	[thread overview]
Message-ID: <20250423234823.75225cab@windsurf> (raw)
In-Reply-To: <VI1PR06MB89261C88ECA6A6ACC6D9FFCCADBB2@VI1PR06MB8926.eurprd06.prod.outlook.com>

Hello Ayrton,

Thanks for your patch!

On Tue, 22 Apr 2025 14:01:24 +0000
Ayrton Leyssens <aleyssens@idtech.be> wrote:

>  LIBNSS_BUILD_VARS = \
> +	BUILD_OPT=1 \

Could you clarify what this does exactly? Indeed, Buildroot already
passes its own optimization flags in CFLAGS, based on the
BR2_OPTIMIZE_* settings, and we clearly don't want libnss to override
that.

Without your patch, when I look at the libnss build, I see:

/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -o Linux2.6_arm_arm-linux-gcc.br_real_glibc_PTH_DBG.OBJ/tstclnt -g -g -fPIC   -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 -g0 -D_FORTIFY_SOURCE=1 -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DXP_UNIX -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\"so\" -DDEBUG -UNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSDB_MEASURE_USE_TEMP_DIR -D_REENTRANT -DDEBUG -UNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSDB_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_DISABLE_AVX2 -DNSS_DISABLE_SSE3 -DNSS_NO_INIT_SUPPORT -DNSS_DISABLE_ARM32_NEON -DNSS_DISABLE_ALTIVEC -DNSS_DISABLE_CRYPTO_VSX -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/nspr -I/home/thomas/projets/buildroot/output/build/libnss-3.110/dist/include -
 I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/seccmd -I../../../dist/public/dbm  Linux2.6_arm_arm-linux-gcc.br_real_glibc_PTH_DBG.OBJ/tstclnt.o  -z noexecstack  -z noexecstack  -z noexecstack  -z noexecstack  -z noexecstack  -z noexecstack  -z noexecstack  -z noexecstack /home/thomas/projets/buildroot/output/build/libnss-3.110/dist/lib/libsectool.a  -L/home/thomas/projets/buildroot/output/build/libnss-3.110/dist/lib -L/home/thomas/projets/buildroot/output/build/libnss-3.110/dist/lib -lnssutil3 -L/home/thomas/projets/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib -lplc4 -lplds4 -lnspr4  -lssl3 -lsmime3 -lnss3 -lpthread  -ldl -lc -lz

So -O2 is present (from Buildroot), and the -g0 (from Buildroot, by
default) disables the production of debugging symbols which are
apparently enabled earlier by default by libnss (using -g).

So from my perspective, there is nothing to fix, and things are working
as intended. Could you clarify what optimization you are missing, and
how/where you spotted the issue?

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-04-23 21:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 14:01 [Buildroot] [PATCH 1/1] package/libnss fix buildtype Ayrton Leyssens
2025-04-23 21:48 ` Thomas Petazzoni via buildroot [this message]
2025-04-24  6:11   ` Ayrton Leyssens
2025-05-17 15:18     ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250423234823.75225cab@windsurf \
    --to=buildroot@buildroot.org \
    --cc=aleyssens@idtech.be \
    --cc=gfouarge@idtech.be \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.