blob: bbf150c7982495d10eac51e3fa85c95f701cb711 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* vi: set sw=4 ts=4: */
/*
* Stub for linking busybox binary against libbusybox.
*
* Copyright (C) 2007 Denis Vlasenko
*
* Licensed under GPLv2, see file License in this tarball for details.
*/
#include <assert.h>
#include "busybox.h"
/* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */
#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)
#warning Static linking against glibc produces buggy executables
#warning (glibc does not cope well with ld --gc-sections).
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
#warning Note that glibc is unsuitable for static linking anyway.
#warning If you still want to do it, remove -Wl,--gc-sections
#warning from top-level Makefile and remove this warning.
#error Aborting compilation.
#endif
#if ENABLE_BUILD_LIBBUSYBOX
int main(int argc, char **argv)
{
return libbusybox_main(argc, argv);
}
#endif
|