summaryrefslogtreecommitdiffstats
path: root/freebsd-to-rtems.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2020-09-03 09:54:27 +1000
committerChris Johns <chrisj@rtems.org>2020-09-16 15:49:37 +1000
commitc38f93b0c6da8c1da59e611502899cac3d169426 (patch)
tree438e5ecc0c0b04bd6aad863387fe9513da2e0a2b /freebsd-to-rtems.py
parentwaf: Add a config report (diff)
downloadrtems-libbsd-c38f93b0c6da8c1da59e611502899cac3d169426.tar.bz2
build: Separate the kernel and user land include paths
- Provide support for separate user and kernel include paths in libbsd.py. - Update all added files with a suitable context to build them with. Supported contexts are `kernel` and `user`. - Kernel source use the kernel, CPU, and build header paths in this order. - User source use the user, kernel, CPU and build header paths in this order. The FreeBSD /usr/include tree has some kernel header files installed as well as user land header files. This complicates the separation as some kernel header files are not visible to user land code while other are. This is handled by appending the kernel header paths to the user header paths so user land code will include a user header with the same name as a kernel header over the kernel header but will find a kernel header if there is no matching user header file. Closes #4067
Diffstat (limited to 'freebsd-to-rtems.py')
-rwxr-xr-xfreebsd-to-rtems.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index 5710b902..8f66e589 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -152,6 +152,18 @@ try:
libbsd.load(build)
build.generateBuild(only_enabled=False)
+ dups = build.duplicateCheck()
+ if len(dups) > 0:
+ print()
+ print('Duplicates: %d' % (len(dups)))
+ mods = list(set([dup[0] for dup in dups]))
+ max_mod_len = max(len(dup[1]) for dup in dups)
+ for mod in mods:
+ print(' %s:' % (mod))
+ for dup in [dup for dup in dups if dup[0] == mod]:
+ print(' %-*s %s %s' % (max_mod_len, dup[1], dup[3][0].upper(), dup[2]))
+ print()
+
if isConfig:
print()
print(build)