> Date: Fri, 29 Apr 2016 13:41:00 +0200
> From: Martin Pieuchot <[email protected]>
> 
> On 28/04/16(Thu) 14:49, Mark Kettenis wrote:
> > > Date: Thu, 28 Apr 2016 13:50:53 +0200
> > > From: Martin Pieuchot <[email protected]>
> > > 
> > > The reason why we do not use 'static' in the kernel is no longer valid
> > > since all our platforms are ELF.  ddb(4) handle them just fine.
> > > 
> > > Here's an example after setting 'static' in the uhci(4) driver:
> > > 
> > >   $ nm /bsd |grep uhci_poll_hub
> > >   ffffffff81107080 t uhci_poll_hub
> > >   
> > >   $ nm /obsd |grep uhci_poll_hub
> > >   ffffffff81107080 T uhci_poll_hub
> > > 
> > > Diff below convert and unify all the Makefile.$arch to no longer remove
> > > local symbols.
> > 
> > In principle this diff is fine.  I don't expect the symbol tables to
> > grow too much by this.
> > 
> > However, using static in the kernel is still bad.  The compiler will
> > optimize away static functions, and when that happens they won't show
> > up in the backtraces.
> 
> My tests show that adding '-fno-inline-functions-called-once' prevent
> gcc(1) to inline small static functions declared locally and used once.
> 
> So ok with that added?

I don't think we should rely on obscure optimization-tuning flags like
-fno-inline-functions-called-once.  Relying on such compiler-specific
options makes switching compilers more difficult.

I think we should simply continue the current practice of not using
static in the kernel.  I mean, what is the benefit of abandoning that
practice if you disable the optimizations that compiler would make
anyway?

Oh, and please don't add this option in the middle of all the
-fno-builtin-xxx options.

Your original diff is fine.  It helps those cases where we ignore the
"no-static" rule (such as dev/drm).

Cheers,

Mark


> Index: arch/alpha/conf/Makefile.alpha
> ===================================================================
> RCS file: /cvs/src/sys/arch/alpha/conf/Makefile.alpha,v
> retrieving revision 1.87
> diff -u -p -r1.87 Makefile.alpha
> --- arch/alpha/conf/Makefile.alpha    13 Jan 2015 01:12:48 -0000      1.87
> +++ arch/alpha/conf/Makefile.alpha    29 Apr 2016 11:32:23 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -mno-fp-regs -Wa,-mev56
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -77,14 +78,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/amd64/conf/Makefile.amd64
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/conf/Makefile.amd64,v
> retrieving revision 1.66
> diff -u -p -r1.66 Makefile.amd64
> --- arch/amd64/conf/Makefile.amd64    13 Nov 2015 07:52:20 -0000      1.66
> +++ arch/amd64/conf/Makefile.amd64    29 Apr 2016 11:32:25 -0000
> @@ -31,6 +31,7 @@ CMACHFLAGS= -mcmodel=kernel -mno-red-zon
>               -mno-mmx -msoft-float -fno-omit-frame-pointer
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -81,13 +82,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/armish/conf/Makefile.armish
> ===================================================================
> RCS file: /cvs/src/sys/arch/armish/conf/Makefile.armish,v
> retrieving revision 1.51
> diff -u -p -r1.51 Makefile.armish
> --- arch/armish/conf/Makefile.armish  13 Jan 2015 01:12:49 -0000      1.51
> +++ arch/armish/conf/Makefile.armish  29 Apr 2016 11:32:29 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -85,14 +86,13 @@ SYSTEM_LD_TAIL+=; \
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/armv7/conf/Makefile.armv7
> ===================================================================
> RCS file: /cvs/src/sys/arch/armv7/conf/Makefile.armv7,v
> retrieving revision 1.12
> diff -u -p -r1.12 Makefile.armv7
> --- arch/armv7/conf/Makefile.armv7    8 Jun 2015 06:33:16 -0000       1.12
> +++ arch/armv7/conf/Makefile.armv7    29 Apr 2016 11:32:34 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -ffreestanding -msoft-float -march=armv6 -Wa,-march=armv7a
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -82,14 +83,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/hppa/conf/Makefile.hppa
> ===================================================================
> RCS file: /cvs/src/sys/arch/hppa/conf/Makefile.hppa,v
> retrieving revision 1.80
> diff -u -p -r1.80 Makefile.hppa
> --- arch/hppa/conf/Makefile.hppa      13 Jan 2015 01:12:49 -0000      1.80
> +++ arch/hppa/conf/Makefile.hppa      29 Apr 2016 11:32:42 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -mfast-indirect-calls -mportable-runtime -mno-space-regs
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  CMACHFLAGS+= -fno-stack-protector
>  
> @@ -87,13 +88,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/hppa64/conf/Makefile.hppa64
> ===================================================================
> RCS file: /cvs/src/sys/arch/hppa64/conf/Makefile.hppa64,v
> retrieving revision 1.52
> diff -u -p -r1.52 Makefile.hppa64
> --- arch/hppa64/conf/Makefile.hppa64  13 Jan 2015 01:12:49 -0000      1.52
> +++ arch/hppa64/conf/Makefile.hppa64  29 Apr 2016 11:32:47 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -mpa-risc-2-0 -mno-space-regs -mdisable-fpregs
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  CMACHFLAGS+= -fno-stack-protector
>  
> @@ -79,7 +80,7 @@ SYSTEM_LD_TAIL=     @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
> Index: arch/i386/conf/Makefile.i386
> ===================================================================
> RCS file: /cvs/src/sys/arch/i386/conf/Makefile.i386,v
> retrieving revision 1.93
> diff -u -p -r1.93 Makefile.i386
> --- arch/i386/conf/Makefile.i386      12 Aug 2015 06:19:25 -0000      1.93
> +++ arch/i386/conf/Makefile.i386      29 Apr 2016 11:32:52 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -83,14 +84,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/landisk/conf/Makefile.landisk
> ===================================================================
> RCS file: /cvs/src/sys/arch/landisk/conf/Makefile.landisk,v
> retrieving revision 1.53
> diff -u -p -r1.53 Makefile.landisk
> --- arch/landisk/conf/Makefile.landisk        13 Jan 2015 01:12:49 -0000      
> 1.53
> +++ arch/landisk/conf/Makefile.landisk        29 Apr 2016 11:32:57 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -m4-nofpu
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -76,14 +77,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/loongson/conf/Makefile.loongson
> ===================================================================
> RCS file: /cvs/src/sys/arch/loongson/conf/Makefile.loongson,v
> retrieving revision 1.45
> diff -u -p -r1.45 Makefile.loongson
> --- arch/loongson/conf/Makefile.loongson      13 Jan 2015 01:12:49 -0000      
> 1.45
> +++ arch/loongson/conf/Makefile.loongson      29 Apr 2016 11:33:03 -0000
> @@ -37,6 +37,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -mno-abicalls ${ABI} -msoft-float -Wa,-mfix-loongson2f-btb -G 0
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -84,14 +85,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/luna88k/conf/Makefile.luna88k
> ===================================================================
> RCS file: /cvs/src/sys/arch/luna88k/conf/Makefile.luna88k,v
> retrieving revision 1.59
> diff -u -p -r1.59 Makefile.luna88k
> --- arch/luna88k/conf/Makefile.luna88k        13 Jan 2015 01:12:49 -0000      
> 1.59
> +++ arch/luna88k/conf/Makefile.luna88k        29 Apr 2016 11:33:07 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -mno-check-zero-division -mmemcpy
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc 
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -81,14 +82,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/macppc/conf/Makefile.macppc
> ===================================================================
> RCS file: /cvs/src/sys/arch/macppc/conf/Makefile.macppc,v
> retrieving revision 1.71
> diff -u -p -r1.71 Makefile.macppc
> --- arch/macppc/conf/Makefile.macppc  13 Jan 2015 01:12:49 -0000      1.71
> +++ arch/macppc/conf/Makefile.macppc  29 Apr 2016 11:33:13 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -msoft-float -Wa,-many
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -76,14 +77,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/octeon/conf/Makefile.octeon
> ===================================================================
> RCS file: /cvs/src/sys/arch/octeon/conf/Makefile.octeon,v
> retrieving revision 1.21
> diff -u -p -r1.21 Makefile.octeon
> --- arch/octeon/conf/Makefile.octeon  13 Jan 2015 01:12:50 -0000      1.21
> +++ arch/octeon/conf/Makefile.octeon  29 Apr 2016 11:33:19 -0000
> @@ -37,6 +37,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -mno-abicalls ${ABI} -msoft-float -G 0
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -85,13 +86,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> +LINKFLAGS+=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/sgi/conf/Makefile.sgi
> ===================================================================
> RCS file: /cvs/src/sys/arch/sgi/conf/Makefile.sgi,v
> retrieving revision 1.69
> diff -u -p -r1.69 Makefile.sgi
> --- arch/sgi/conf/Makefile.sgi        13 Jan 2015 01:12:50 -0000      1.69
> +++ arch/sgi/conf/Makefile.sgi        29 Apr 2016 11:33:24 -0000
> @@ -37,6 +37,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -mno-abicalls ${ABI} -msoft-float -G 0
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -84,14 +85,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/socppc/conf/Makefile.socppc
> ===================================================================
> RCS file: /cvs/src/sys/arch/socppc/conf/Makefile.socppc,v
> retrieving revision 1.42
> diff -u -p -r1.42 Makefile.socppc
> --- arch/socppc/conf/Makefile.socppc  13 Jan 2015 01:12:50 -0000      1.42
> +++ arch/socppc/conf/Makefile.socppc  29 Apr 2016 11:33:29 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -msoft-float -Wa,-many
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -76,14 +77,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/sparc/conf/Makefile.sparc
> ===================================================================
> RCS file: /cvs/src/sys/arch/sparc/conf/Makefile.sparc,v
> retrieving revision 1.84
> diff -u -p -r1.84 Makefile.sparc
> --- arch/sparc/conf/Makefile.sparc    13 Jan 2015 01:12:50 -0000      1.84
> +++ arch/sparc/conf/Makefile.sparc    29 Apr 2016 11:33:35 -0000
> @@ -33,6 +33,7 @@ CMACHFLAGS+=        -mcpu=supersparc
>  .endif
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -80,14 +81,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/sparc64/conf/Makefile.sparc64
> ===================================================================
> RCS file: /cvs/src/sys/arch/sparc64/conf/Makefile.sparc64,v
> retrieving revision 1.72
> diff -u -p -r1.72 Makefile.sparc64
> --- arch/sparc64/conf/Makefile.sparc64        13 Jan 2015 01:12:50 -0000      
> 1.72
> +++ arch/sparc64/conf/Makefile.sparc64        29 Apr 2016 11:33:40 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -Wa,-Av9b, -mno-fpu
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -77,14 +78,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -S -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> Index: arch/zaurus/conf/Makefile.zaurus
> ===================================================================
> RCS file: /cvs/src/sys/arch/zaurus/conf/Makefile.zaurus,v
> retrieving revision 1.54
> diff -u -p -r1.54 Makefile.zaurus
> --- arch/zaurus/conf/Makefile.zaurus  13 Jan 2015 01:12:50 -0000      1.54
> +++ arch/zaurus/conf/Makefile.zaurus  29 Apr 2016 11:33:49 -0000
> @@ -30,6 +30,7 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-fun
>  CMACHFLAGS=  -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
>  CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
>               -fno-builtin-vsnprintf -fno-builtin-log \
> +             -fno-inline-functions-called-once \
>               -fno-builtin-log2 -fno-builtin-malloc ${NOPIE_FLAGS}
>  .if ${IDENT:M-DNO_PROPOLICE}
>  CMACHFLAGS+= -fno-stack-protector
> @@ -81,14 +82,13 @@ SYSTEM_LD_TAIL=   @${SIZE} $@; chmod 755 $
>  
>  DEBUG?=
>  .if ${DEBUG} == "-g"
> -LINKFLAGS+=  -X
> -STRIPFLAGS=  -g -x
> +STRIPFLAGS=  -S
>  SYSTEM_LD_TAIL+=; \
>               echo mv $@ [email protected]; rm -f [email protected]; mv $@ [email protected]; \
>               echo ${STRIP} ${STRIPFLAGS} -o $@ [email protected]; \
>               ${STRIP} ${STRIPFLAGS} -o $@ [email protected]
>  .else
> -LINKFLAGS+=  -x
> +LINKFLAGS+=  -S
>  .endif
>  
>  %LOAD
> 
> 

Reply via email to