Re: getconf options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 24, 2017 at 01:27:37PM +0900, Masahiro Yamada wrote:
> 2017-10-20 22:20 GMT+09:00 Ben Hutchings <ben@xxxxxxxxxxxxxxx>:
> > On Fri, 2017-10-20 at 07:47 +0200, Uwe Kleine-König wrote:
> >> Hello,
> >>
> >> On Fri, Oct 20, 2017 at 04:14:44AM +0000, yamada.masahiro@xxxxxxxxxxxxx wrote:
> >> > > With commit d7f14c66c273b00aaa626f419d3155773a88d460, I got the follow
> >> > > warning on macos.
> >> > >
> >> > > getconf: no such configuration parameter `LFS_CFLAGS'
> >> > > getconf: no such configuration parameter `LFS_LDFLAGS'
> >> > > getconf: no such configuration parameter `LFS_LIBS'
> >> > > scripts/kconfig/mconf  Kconfig
> >> > >
> >> > > $ getconf LFS_CFLAGS
> >> > > getconf: no such configuration parameter `LFS_CFLAGS'
> >> > >
> >> > >
> >> > > Do you have some idea about this? Are these paremeters default to getconf?
> >> > >
> >> > > -Feng
> >> > >
> >> >
> >> >
> >> > Do you have a clue?
> >> >
> >> >
> >> > Does it make sense to suppress warnings like this?
> >> >
> >> > HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
> >> > HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
> >> > HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
> >> >
> >> >
> >> > Or, hard-code
> >> > -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> >> > as Ben originally suggested?
> >>
> >> I'm not a fan of hardcoding these. On 64 bit arch (and I think also a
> >> few 32 bit archs (x32?)) they are not needed and so IMHO shouldn't be
> >> added.
> >
> > What harm would they do?
> >
> > Ben.
> >
> >> I think 2>/dev/null is fine.
> 
> 
> If your machine does not recognize "getconf LFS_CFLAGS",
> but needs LFS flags, it is a problem.
> 
> Hard-coding the flags seem more stable to me.

Don't know how real the danger is that $(getconf LFS_CFLAGS) returns
something that is neither "" nor "-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64". Are there platforms that knowingly depend on
sizeof(off_t) = 4 which break when -D_FILE_OFFSET_BITS=64 is passed?
When will we depend on -D_FILE_OFFSET_BITS=128? Probably all these are
not relevant now, still it feels more right to go the 2>/dev/null way
for me.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux