summaryrefslogtreecommitdiffstats
path: root/patches/ppp-2.4.4/generic/ppp-2.4.4-undefined-main.diff
blob: 75649221d820a6e71c66af8f13296792bcc16f57 (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
Subject: pppd: undefined main
From: Robert Schwebel <r.schwebel@pengutronix.de>

When compiling this code, gcc barfs here:

/some/path/../sysroot-arm-v4t-linux-gnueabi/usr/lib/crt1.o: In function `_start':
init.c:(.text+0x30): undefined reference to `main'

So we add a -c switch to the Makefile.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 pppd/plugins/Makefile.linux |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: pppd/plugins/Makefile.linux
===================================================================
--- pppd/plugins/Makefile.linux.orig
+++ pppd/plugins/Makefile.linux
@@ -23,7 +23,7 @@ all:	$(PLUGINS)
 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
 
 %.so: %.c
-	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
+	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) -c $^
 
 VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)