[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] buildsys: resurrect PLATFORM_LINUX and depend on it for linux-specific applets
From:       Michael Tokarev <mjt () tls ! msk ! ru>
Date:       2022-11-04 17:33:24
Message-ID: 66d37c76-64da-e891-de3b-da9573cf8ae5 () msgid ! tls ! msk ! ru
[Download RAW message or body]

Just a bit of context I failed to add.

I'm aware of the previous issues there,

http://lists.busybox.net/pipermail/busybox/2011-February/074954.html

was the reason it was changed from "depends on linux" to "select linux".
It was a wrong thing to do, instead, PLATFORM_LINUX should have been
made a non-user-selectable symbol whith automatic value depending on
the actual platform in question.

This is an attempt to do just that.

Thanks,

/mjt

04.11.2022 19:49, Michael Tokarev wrote:
> This effectively reverts the following two commits:
> 
>    commit e3b1a1fd28558f7a1b3c0ec33313bedb675be8a1
>    Author: Denys Vlasenko <vda.linux@googlemail.com>
>    Date:   Sat Feb 26 22:24:08 2011 +0100
> 
>      Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX"
> 
> and
> 
>    commit 5c69ad0ecdc18cf51b312c7c82848f4438fe1c8d
>    Author: Ron Yorston <rmy@pobox.com>
>    Date:   Tue Aug 4 08:24:19 2020 +0100
> 
>      build system: drop PLATFORM_LINUX
> 
> but does, hopefully, the right thing.
> 
> Original complain was that the allnoconfig turns off PLATFORM_LINUX
> on which all linux-specific applets depends. Instead of setting this
> config option right for linux and non-linux (initially it was just a
> regular kconfig symbol, not set depending on the platform), it were
> turned into something which made little sense (in the first commit),
> and later dropped completely.
> 
> So introduce a dynamic kconfig symbol PLATFORM_LINUX with the value
> actually depending on the target platform, so that it is not affected
> by all{yes|no|whatever}config. This way, it is possible to depend on
> it for linux-specific applets without breaking *config anymore.
> 
> It is done by creating a small kconfig fragment, .platform.in, to
> define just PLATFORM_LINUX symbol. It is created in Makefile if
> ${CPP} has __linux__ #defined. And include it in the top-level Config.in.
> 
> Regenerate default config files with the new symbol.
> 
> And mark all the applets which were marked as "select PLATFORM_LINUX"
> before the "build system: drop PLATFORM_LINUX" commit, as
> "depends on PLATFORM_LINUX".
> 
> Also mark 2 other applets, tc and dhcprelay, as linux-only too.
> 
> This way, it is finally possible to build busybox on other platforms
> without really huge efforts to maintain list of "incompatible" applets
> externally, and does not put any pressure on the main development, -
> the only thing needed is to keep the existing "depends on PLATFORM_LINUX"
> lines.
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
...

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic