Bug 210953 - 11.0 -r302412 via powerpc64-xtoolchain-gcc fails to build: dev/ahci/ahci.c:288:22: error: unknown conversion type character 'b' in format; too many arguments for format
Summary: 11.0 -r302412 via powerpc64-xtoolchain-gcc fails to build: dev/ahci/ahci.c:28...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-BETA1
Hardware: powerpc Any
: --- Affects Some People
Assignee: Enji Cooper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-10 01:14 UTC by Mark Millard
Modified: 2016-07-11 06:23 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Millard 2016-07-10 01:14:32 UTC
--- all_subdir_ahci ---
/usr/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function 'ahci_attach':
/usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:288:22: error: unknown conversion type character 'b' in format [-Werror=format=]
   device_printf(dev, "quirks=0x%b\n", ctlr->quirks,
                      ^
/usr/src/sys/modules/ahci/../../dev/ahci/ahci.c:288:22: error: too many arguments for format [-Werror=format-extra-args]

FYI (prior ahci.o material):

--- ahci.o ---
/usr/local/bin/powerpc64-portbld-freebsd11.0-gcc -isystem /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/include -L/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib --sysroot=/usr/obj/xtoolchain/powerpc.powerpc64
/usr/src/tmp -B/usr/local/powerpc64-freebsd/bin/ -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/sys/GENERIC64vtsc-N
ODEBUG/opt_global.h -I. -I/usr/src/sys -fno-common -g -mlongcall -fno-omit-frame-pointer -I/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/sys/GENERIC64vtsc-NODEBUG  -MD  -MF.depend.ahci.o -MTahci.o -mno-altivec -ffreestanding -f
wrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign   -Wmissing-include-dirs -fdiagnostics-show-op
tion  -Wno-unknown-pragmas  -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable  -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized  -Wno-error=array-bounds -Wno-error=address  -Wno
-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes  -Wno-error=strict-overflow -Wno-error=overflow  -v -finline-limit=15000 -fms-extensions --param inline-unit-growth=100 --param large-function-growth=1000 -msoft-
float -mcall-aixdesc  -std=iso9899:1999 -c /usr/src/sys/modules/ahci/../../dev/ahci/ahci.c -o ahci.o
. . .
--- ahci.o ---
Using built-in specs.
. . .
--- ahci.o ---
COLLECT_GCC=/usr/local/bin/powerpc64-portbld-freebsd11.0-gcc
Target: powerpc64-portbld-freebsd11.0
Configured with: ./../gcc-5.3.0/configure --target=powerpc64-portbld-freebsd11.0 --disable-nls --enable-languages=c,c++ --without-headers --with-gmp=/usr/local --with-pkgversion='FreeBSD Ports Collection for powerpc64' --with-s
ystem-zlib --with-as=/usr/local/bin/powerpc64-freebsd-as --with-ld=/usr/local/bin/powerpc64-freebsd-ld --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/ --build=x86_64-portbld-freebsd11
.0
Thread model: posix
gcc version 5.3.0 (FreeBSD Ports Collection for powerpc64) 
. . .
--- ahci.o ---
ay-bounds -Wno-error=address -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes -Wno-error=strict-overflow -Wno-error=overflow -std=c99 -version -fno-strict-aliasing -fno-common -fno-omit-frame-pointer -ffrees
tanding -fwrapv -fstack-protector -fdiagnostics-show-option -finline-limit=15000 -fms-extensions --param inline-unit-growth=100 --param large-function-growth=1000 -o - |
 /usr/local/bin/powerpc64-freebsd-as -v -I . -I /usr/src/sys -I /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/sys/GENERIC64vtsc-NODEBUG --traditional-format -a64 -mppc64 -many -o ahci.o
GNU assembler version 2.25.1 (powerpc64-freebsd) using BFD version (GNU Binutils) 2.25.1
. . .
--- ahci.o ---
GNU C99 (FreeBSD Ports Collection for powerpc64) version 5.3.0 (powerpc64-portbld-freebsd11.0)
        compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 (branches/release_38 258549), GMP version 5.1.3, MPFR version 3.1.3, MPC version 1.0.3
warning: MPFR header version 3.1.3 differs from library version 3.1.4-p1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/src/sys
 /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/sys/GENERIC64vtsc-NODEBUG
 /usr/obj/xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/include
End of search list.
Comment 1 Mark Millard 2016-07-10 01:22:14 UTC
(In reply to Mark Millard from comment #0)

The actual source lines in question are from:

        if (ctlr->quirks != 0) {
                device_printf(dev, "quirks=0x%b\n", ctlr->quirks,
                    AHCI_Q_BIT_STRING);
        }
Comment 2 Mark Millard 2016-07-10 01:24:07 UTC
(In reply to Mark Millard from comment #1)

The /usr/ports vintage was -r418253:

# svnlite info /usr/ports
Path: /usr/ports
Working Copy Root Path: /usr/ports
URL: svn://svn.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 418253
Node Kind: directory
Schedule: normal
Last Changed Author: feld
Last Changed Rev: 418253
Last Changed Date: 2016-07-08 18:09:44 -0700 (Fri, 08 Jul 2016)
Comment 3 Mark Millard 2016-07-10 05:50:53 UTC
(In reply to Mark Millard from comment #2)

Turns out that -r302441 on stable/11 reverted a kern.mk change controlling what formats are (un)available for some compilers.

A rebuild based on -r302457 completed fine for the powerpc64-gcc use.

Also Ngie wrote (but I have no control of the Assignee field):

Begin forwarded message:

From: Ngie Cooper <yaneurabeya at gmail.com>
Subject: Re: [Bug 210953] 11.0 -r302412 via powerpc64-xtoolchain-gcc fails to build: dev/ahci/ahci.c:288:22: error: unknown conversion type character 'b' in format; too many arguments for format
Date: July 9, 2016 at 8:53:31 PM PDT
To: Mark Millard <markmi at dsl-only.net>
Cc: freebsd-bugs at FreeBSD.org


On Jul 9, 2016, at 18:52, bugzilla-noreply at freebsd.org wrote:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210953

Mark Millard <markmi at dsl-only.net> changed:

I accidentally committed this regression to kern.mk. I don't have bugzilla login right now. Please assign the bug to me and I'll mark it fixed for the rev I did it in with head and stable/10.

Thanks!
-Ngie
Comment 4 Enji Cooper freebsd_committer freebsd_triage 2016-07-11 06:23:23 UTC
Already fixed in ^/head@r302438 and ^/stable/11@r302441