# make make[1]: Nothing to be done for `all'. make[1]: Nothing to be done for `relocs'. CHK include/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h CHK kernel/config_data.h LD [M] drivers/scsi/scsi_mod.o CC [M] drivers/scsi/lpfc/lpfc_scsi.o cc1: warnings being treated as errors drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’: drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’ drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl_prot’: drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable ‘rc’ drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl’: drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable ‘rc’ drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl_prot’: drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable ‘rc’ make[3]: *** [drivers/scsi/lpfc/lpfc_scsi.o] Error 1 make[2]: *** [drivers/scsi/lpfc] Error 2 make[1]: *** [drivers/scsi] Error 2 make: *** [drivers] Error 2 # grep LPFC .config CONFIG_SCSI_LPFC=m Reproducible: Always Portage 2.1.10.65 (hardened/linux/x86, gcc-4.5.3, glibc-2.14.1-r3, 3.1.0-3-grml-486 i686) ================================================================= System uname: Linux-3.1.0-3-grml-486-i686-Intel-R-_Xeon-TM-_CPU_3.20GHz-with-gentoo-2.1 Timestamp of tree: Wed, 11 Jul 2012 11:15:01 +0000 app-shells/bash: 4.2_p20 dev-lang/python: 2.7.3-r2, 3.2.3 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.6 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 3.1 (virtual/os-headers) sys-libs/glibc: 2.14.1-r3 Repositories: gentoo x-local sunrise ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-pipe -march=native -O2" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXXFLAGS="-pipe -march=native -O2" DISTDIR="/var/cache/portage/distfiles" EMERGE_DEFAULT_OPTS="--usepkg --buildpkg --binpkg-respect-use --with-bdeps y --keep-going" FCFLAGS="-march=i686 -O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild- head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-march=i686 -O2 -pipe" GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.o rg" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" MAKEOPTS="-j3" PKGDIR="/var/cache/portage/packages" PORTAGE_COMPRESS="xz" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS=" --delete-excluded --include='/sci-libs/' --include='/sci-libs/gsl/' --exclude='/sci-libs/*/' --include='/x11-libs/' --include='/x11-misc/' --include='/x11-proto/' --exclude='/games*/' --exclude='/gnome*/' --exclude='/gnuste p*/' --exclude='/gpe*/' --exclude='/kde*/' --exclude='/lxde*/' --exclude='/rox*/' --exclude='/sci*/' --exclude='/x11*/' --exclude='/xfce*/'" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout= 180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/cache/portage/gentoo" PORTDIR_OVERLAY="/var/cache/portage/local /var/cache/portage/overlays/sunrise" [...] Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
./linux-3.4.2-hardened/drivers/scsi/lpfc/Makefile:ccflags-y += -Werror This is causing the problem. However I can't reproduce this with gcc 4.6.2 on amd64. Adding '-Wno-unused' before '-Werror' should solve it.
This is not hardened specific. @gokturk. Do you want to make a patch. I'll test and if it works, it should go into genpatches and better still upstream.
Created attachment 318762 [details, diff] proposed fix Strange, although I'm cc'd to the bug, I don't see it in my inbox. Anyway this patch is against 3.4 tarball. I appended it to ${UNIPATCH_LIST} of hardened-sources-3.4.2 ebuild and it seems to apply just fine. With 'CONFIG_SCSI_LPFC=y' it compiled successfully.
(In reply to comment #3) > Created attachment 318762 [details, diff] [details, diff] > proposed fix > > Strange, although I'm cc'd to the bug, I don't see it in my inbox. Anyway > this patch is against 3.4 tarball. I appended it to ${UNIPATCH_LIST} of > hardened-sources-3.4.2 ebuild and it seems to apply just fine. With > 'CONFIG_SCSI_LPFC=y' it compiled successfully. Okay this fix was included in hardened-sources-3.4.6. Please test and reopen if this is still an issue.
*** Bug 430238 has been marked as a duplicate of this bug. ***
*** Bug 434454 has been marked as a duplicate of this bug. ***