blob: 636b5c91e20d10e6385da292275fc039724b1ea7 [file] [log] [blame]
Eric Andersenaad1a882001-03-16 22:47:14 +00001/* vi: set sw=4 ts=4: */
2/*
Denis Vlasenko724d1962007-10-10 14:41:07 +00003 * Stub for linking busybox binary against libbusybox.
Eric Andersenaad1a882001-03-16 22:47:14 +00004 *
Denis Vlasenko724d1962007-10-10 14:41:07 +00005 * Copyright (C) 2007 Denis Vlasenko
Eric Andersenaad1a882001-03-16 22:47:14 +00006 *
Denis Vlasenko724d1962007-10-10 14:41:07 +00007 * Licensed under GPLv2, see file License in this tarball for details.
Eric Andersenaad1a882001-03-16 22:47:14 +00008 */
9
Manuel Novoa III 31b98dd2004-02-01 10:03:05 +000010#include <assert.h>
Denis Vlasenkoc7ba8b92007-02-03 17:27:14 +000011#include "busybox.h"
12
Denis Vlasenko07159f02006-11-09 00:00:12 +000013/* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */
14#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)
Denis Vlasenkodf518922006-10-20 13:42:57 +000015#warning Static linking against glibc produces buggy executables
Denis Vlasenko067e3f02006-11-10 23:25:53 +000016#warning (glibc does not cope well with ld --gc-sections).
Denis Vlasenkoafea46b2006-10-29 19:37:13 +000017#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
Denis Vlasenko83e5d6f2006-12-18 21:49:06 +000018#warning Note that glibc is unsuitable for static linking anyway.
19#warning If you still want to do it, remove -Wl,--gc-sections
Denis Vlasenko15c38852007-11-05 19:31:01 +000020#warning from scripts/trylink and remove this warning.
Denis Vlasenko4500c582007-05-18 07:37:06 +000021#error Aborting compilation.
Denis Vlasenkodf518922006-10-20 13:42:57 +000022#endif
23
Denis Vlasenko724d1962007-10-10 14:41:07 +000024#if ENABLE_BUILD_LIBBUSYBOX
Denis Vlasenko32b633a2007-04-09 03:05:48 +000025int main(int argc, char **argv)
26{
Denis Vlasenko9b49a5e2007-10-11 10:05:36 +000027 return lbb_main(argc, argv);
Denis Vlasenko32b633a2007-04-09 03:05:48 +000028}
Denis Vlasenko724d1962007-10-10 14:41:07 +000029#endif