print/acroreadwrapper and gcc 4.6.3 ISSUE
b.f.
bf1783 at googlemail.com
Sat Jan 5 21:41:40 UTC 2013
> Building for acroreadwrapper-0.0.20110920
> Warning: Object directory not changed from original
> /usr/ports/print/acroreadwrapper/work/linux_adobe_kmod-20110920
> @ -> /usr/src/sys
> machine -> /usr/src/sys/i386/include
> x86 -> /usr/src/sys/x86/include
> gcc46 -O2 -pipe -march=pentium4 -mtune=pentium4
> -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -march=pentium4
> -mtune=pentium4 -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@
> -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100
> --param large-function-growth=1000 -fno-common
> -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse -mno-mmx
> -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999
> -fstack-protector -Wall -Wredundant-decls -Wnested-externs
> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline
> -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions
> -Wmissing-include-dirs -fdiagnostics-show-option -c linux_adobe.c
> cc1: error: unrecognized command line option '-mno-align-long-strings'
> cc1: error: unrecognized command line option '-fformat-extensions'
> *** Error code 1
>
> Stop in /usr/ports/print/acroreadwrapper/work/linux_adobe_kmod-20110920.
> *** Error code 1
>
> Stop in /usr/ports/print/acroreadwrapper.
>
> But gcc 4.2+ works fine. It seems that all the *kmod* ports/parts have
> 4.2 'origin' and can't be properly compiled with higher versions of
> gcc or clang.
>
They use base system makefiles to build the kernel modules, which use
various kernel flags, including some FreeBSD-specific ones, for
consistency. You can override CWARNFLAGS from kern.mk, but you should
be careful when mixing toolchains for kernel modules.
You are going to find a lot of ports that fail to build with
non-default toolchains. If you can suggest small, reasonable changes
that make it possible to do so, then submit PRs.
b.
More information about the freebsd-ports
mailing list