Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2017 22:50:25 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        Warner Losh <imp@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r326038 - in head/stand: . arm/uboot efi efi/fdt fdt i386 mips/beri mips/beri/boot2 mips/beri/loader mips/uboot ofw/libofw powerpc/boot1.chrp powerpc/kboot powerpc/ofw powerpc/ps3 power...
Message-ID:  <CANCZdfqWKK3gQaeTN5jV0C4_jhRzQbsEi17nn9ELQREaFdnUKg@mail.gmail.com>
In-Reply-To: <2434FC04-1FF3-48B0-8743-78412673616F@dsl-only.net>
References:  <2434FC04-1FF3-48B0-8743-78412673616F@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 20, 2017 at 10:30 PM, Mark Millard <markmi@dsl-only.net> wrote:

> It looks to me like head/stand/powerpc/boot1.chrp/Makefile might
> have += vs. = issues compared to the other examples:
>
> Warner Losh imp at FreeBSD.org wrote on
> Mon Nov 20 22:42:21 UTC 2017 :
>
> Modified: head/stand/powerpc/boot1.chrp/Makefile
> ============================================================
> ==================
> --- head/stand/powerpc/boot1.chrp/Makefile      Mon Nov 20 22:41:22 2017
>       (r326037)
> +++ head/stand/powerpc/boot1.chrp/Makefile      Mon Nov 20 22:42:17 2017
>       (r326038)
> @@ -13,9 +13,7 @@ SRCS=         boot1.c ashldi3.c syncicache.c
>
>  MAN=
>
> -CFLAGS= -ffreestanding -msoft-float \
> -       -I${LDRSRC} -I${SYSDIR} -I${SASRC} \
> -       -D_STANDALONE
> +CFLAGS= -I${LDRSRC} -I${SYSDIR} -I${SASRC} -D_STANDALONE
>  LDFLAGS=-nostdlib -static -Wl,-N
>
>  .PATH:  ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR}
>
> but the other files tend to use += for at least CFLAGS. In
> one case you converted an = into only using += locally:
>
> -CFLAGS=                -ffreestanding                  \
> -               -I${.CURDIR}                    \
> +CFLAGS+=       -I${.CURDIR}                    \
>
> (Generally the mix seems to be as it was before
> the changes but it likely looked odd before the
> changes when the files were view together.)
>
> There are also examples like:
>
>  LDFLAGS=       -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_
> CPUARCH}
>  LDFLAGS+=      -Wl,-znotext
>
> and others with just = . But some files seem to always
> use += for LDFLAGS.
>
> May be a round of = vs. += checking is appropriate
> for the involved files?
>

Yea. I've done it once or twice already. It's quite likely another pass may
be necessary, so it doesn't surprise me you've found at least one places
that needs a good close look... There's a few places LDFLAGS are used, and
it seems everywhere it has -nostdlib, and maybe a few others. And there's
likely a few places where some of the defines need to be moved around to.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqWKK3gQaeTN5jV0C4_jhRzQbsEi17nn9ELQREaFdnUKg>