aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdlib/callocr.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-02-25 23:47:03 -0500
committerMike Frysinger <vapier@gentoo.org>2022-03-09 16:58:46 -0500
commit4ad6b4d4dfed22777a8e7adb97c803bef0553fb0 (patch)
tree9d3d365a098b5e1e21b4ccc18cad38bf6252bd56 /newlib/libc/stdlib/callocr.c
parent332df71d3491f4f1024b14e2999cec4db13d4b39 (diff)
downloadnewlib-4ad6b4d4dfed22777a8e7adb97c803bef0553fb0.zip
newlib-4ad6b4d4dfed22777a8e7adb97c803bef0553fb0.tar.gz
newlib-4ad6b4d4dfed22777a8e7adb97c803bef0553fb0.tar.bz2
newlib: libc: move stdlib multiplex logic from build to source files
Rather than define per-object rules in the Makefile, have small files that define & include the right content. This simplifies the build rules, and makes understanding the source a little easier (imo) as it makes all the subdirs behave the same: you have 1 source file and it produces 1 object. It's also about the same amount of boiler plate, without having to define custom build rules that can fall out of sync. This will also be important as we merge the libc.a build into the top dir since it relies on a single flat list of objects for overrides. Also take the opportunity to clean up the unnecessary header deps in here. Automake provides dependency generation for free now.
Diffstat (limited to 'newlib/libc/stdlib/callocr.c')
-rw-r--r--newlib/libc/stdlib/callocr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/callocr.c b/newlib/libc/stdlib/callocr.c
new file mode 100644
index 0000000..80fee60
--- /dev/null
+++ b/newlib/libc/stdlib/callocr.c
@@ -0,0 +1,2 @@
+#define DEFINE_CALLOC
+#include "_mallocr.c"