Closed Bug 1618400 Opened 5 years ago Closed 5 years ago

OpenBSD/arm64 compilation error: unused variable 'getauxval'

Categories

(NSS :: Build, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kurt, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.87 Chrome/80.0.3987.87 Safari/537.36

Steps to reproduce:

Build nss on OpenBSD/arm64 using ports system:
cd /usr/ports/security/nss
make

Actual results:

Failed with compilation error:
cc -o OpenBSD6.6_64_OPT.OBJ/OpenBSD_SINGLE_SHLIB/blinit.o -c -std=c99 -O -fPIC -DPIC -Wall -Wno-switch -pipe -DOPENBSD -Wall -Wshadow -Qunused-arguments -Wno-parentheses-equality -Wno-array-bounds -Wno-unevaluated-expression -Werror -DXP_UNIX -DSHLIB_SUFFIX="so.58.2" -DSHLIB_PREFIX="lib" -DSHLIB_VERSION="3" -DSOFTOKEN_SHLIB_VERSION="3" -DRIJNDAEL_INCLUDE_TABLES -UDEBUG -DNDEBUG -pthread -DNSS_NO_INIT_SUPPORT -DSEED_ONLY_DEV_URANDOM -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DNSS_USE_64 -DUSE_HW_AES -DHAVE_INT128_SUPPORT -DMP_API_COMPATIBLE -I/usr/local/include/nspr -I../../../dist/OpenBSD6.6_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -Impi -Iecl -Iverified -Iverified/kremlin/include -Iverified/kremlin/kremlib/dist/minimal -I/usr/local/include -O2 -pipe blinit.c
blinit.c:122:24: error: unused variable 'getauxval' [-Werror,-Wunused-variable]
static unsigned long (*getauxval)(unsigned long) = NULL;
^
1 error generated.
gmake[3]: *** [../../coreconf/rules.mk:393: OpenBSD6.6_64_OPT.OBJ/OpenBSD_SINGLE_SHLIB/blinit.o] Error 1
gmake[3]: Leaving directory '/usr/obj/ports/nss-3.50/nss-3.50/nss/lib/freebl'
gmake[2]: *** [Makefile:639: libs] Error 2

Expected results:

Build succeeded.

Attachment #9129342 - Attachment is patch: true
Attachment #9129342 - Flags: review?(kjacobs.bugzilla)

note that this was loosely related to bug #1602743 being commited i think, as the the #ifdef maze now included this bit. not sure..

Regressed by: 1602743
Has Regression Range: --- → yes
Keywords: regression

After reading the code again, it appear the static getauxval is needed on arm. Please review this updated patch.

Attachment #9129342 - Attachment is obsolete: true
Attachment #9129342 - Flags: review?(kjacobs.bugzilla)
Attachment #9129772 - Flags: review?(kjacobs.bugzilla)

Following up to report that both arm64 & arm are happy with Attachment #9129772 [details] [diff] on OpenBSD.

Comment on attachment 9129772 [details] [diff] [review] patch-nss_lib_freebl_blinit_c Review of attachment 9129772 [details] [diff] [review]: ----------------------------------------------------------------- https://treeherder.mozilla.org/#/jobs?repo=nss-try&revision=fa8629db2f45
Attachment #9129772 - Flags: review?(kjacobs.bugzilla) → review?(jjones)
Comment on attachment 9129772 [details] [diff] [review] patch-nss_lib_freebl_blinit_c Review of attachment 9129772 [details] [diff] [review]: ----------------------------------------------------------------- r+
Attachment #9129772 - Flags: review?(jjones) → review+
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.51
Regressions: 1633498
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: