mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* RFC: types conflicts
@ 2020-07-07 13:56 Peter Mamonov
  2020-07-08  8:02 ` Ahmad Fatoum
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Mamonov @ 2020-07-07 13:56 UTC (permalink / raw)
  To: s.hauer, antonynpavlov; +Cc: barebox, Peter Mamonov

Hello,

I tried to build MicroPython using barebox toolchain and found a number of
conflicts between barebox and compiler headers. Below you will find the patch
which demostrates some of them. In this particular example the problem arises
due to simultaneous inclusion of some compiler headers along with barebox
version of `strings.h`, which in turn includes barebox analogs of those headers
from `include/linux`. I belive there should be a segregation between headers in
`include` and in `include/linux`, i.e. headers from `include/` should not
reference <linux/*.h> headers. Yet I understand this is somewhat problematic.
What do you think?

Regards,
Peter

---
 commands/Makefile         |  1 +
 commands/types_conflict.c | 12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 commands/types_conflict.c

diff --git a/commands/Makefile b/commands/Makefile
index 817fc36e96..4e0cf34560 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -1,3 +1,4 @@
+obj-y				+= types_conflict.o
 obj-$(CONFIG_STDDEV)		+= stddev.o
 obj-$(CONFIG_CMD_DIGEST)	+= digest.o
 obj-$(CONFIG_COMPILE_HASH)	+= hashsum.o
diff --git a/commands/types_conflict.c b/commands/types_conflict.c
new file mode 100644
index 0000000000..70fee8d6f4
--- /dev/null
+++ b/commands/types_conflict.c
@@ -0,0 +1,12 @@
+#include <stdbool.h>
+#include <stdint.h>
+#include <stddef.h>
+
+#include <string.h>
+
+int test(void);
+
+int test()
+{
+	return 0;
+}
-- 
2.24.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-20 21:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 13:56 RFC: types conflicts Peter Mamonov
2020-07-08  8:02 ` Ahmad Fatoum
2020-07-08 21:02   ` Peter Mamonov
2021-04-19  7:58     ` Ahmad Fatoum
2021-04-20 21:47       ` Peter Mamonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox