Skip to contentSkip to conversation

startup.S does not find includes

PATCH In review Christian Franke 3 participants 7 messages Oct 21, 2007 – Oct 22, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 startup.S does not find includes

Hi,

some recent checkin appearently introduces the following regression:

Compilation fails if configure'd outside of $(srcdir).
#include "kern/i386/realmode.S" and "kern/i386/loader.S" fail in startup.S.

Patch is attached.

Christian

Makefile.in +1 -1
@@ -64,7 +64,7 @@ CPPFLAGS = @CPPFLAGS@ -I. -Iinclude -I$(
 	 -DGRUB_LIBDIR=\"$(pkglibdir)\"
 TARGET_CC = @TARGET_CC@
 TARGET_CFLAGS = @TARGET_CFLAGS@
-TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I. -Iinclude -I$(srcdir)/include \
+TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I. -Iinclude -I$(srcdir) -I$(srcdir)/include \
 	-Wall -W
 TARGET_LDFLAGS = @TARGET_LDFLAGS@
 OBJCOPY = @OBJCOPY@
#1 lore raw
Quoted 6 lines · Christian Franke

Hi,

some recent checkin appearently introduces the following regression:

Compilation fails if configure'd outside of $(srcdir).
#include "kern/i386/realmode.S" and "kern/i386/loader.S" fail in startup.S.

Uhm I just noticed that previously existing #includes have relative paths, e.g.:

  #include "lzo1x.S"

Perhaps I should have done the same instead of adding new include dirs.

Thoughts?

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
#2 lore raw
Quoted 10 lines · Robert Millan
Quoted 7 lines · Christian Franke

Hi,

some recent checkin appearently introduces the following regression:

Compilation fails if configure'd outside of $(srcdir).
#include "kern/i386/realmode.S" and "kern/i386/loader.S" fail in startup.S.

Quoted 10 lines

Uhm I just noticed that previously existing #includes have relative paths, e.g.:

  #include "lzo1x.S"

Perhaps I should have done the same instead of adding new include dirs.

Thoughts?

For kern/i386/pc/startup.S:

#include "../realmode.S" // include pc-independent i386 realmode code

Should work without any -I option.

Christian

#3 lore raw
Quoted 16 lines · Christian Franke
Quoted 15 lines · Robert Millan
Quoted 6 lines · Christian Franke

Hi,

some recent checkin appearently introduces the following regression:

Compilation fails if configure'd outside of $(srcdir).
#include "kern/i386/realmode.S" and "kern/i386/loader.S" fail in startup.S.

Uhm I just noticed that previously existing #includes have relative paths, e.g.:

#include "lzo1x.S"

Perhaps I should have done the same instead of adding new include dirs.

Quoted 8 lines
Quoted 2 lines

Thoughts?

For kern/i386/pc/startup.S:

#include "../realmode.S" // include pc-independent i386 realmode code

Should work without any -I option.

I considered that, but wouldn't it break compilation when building in-tree, ie without an obj directory?

#4 lore raw
Quoted 22 lines · walt
Quoted 21 lines · Christian Franke
Quoted 19 lines · Robert Millan
Quoted 7 lines · Christian Franke

Hi,

some recent checkin appearently introduces the following regression:

Compilation fails if configure'd outside of $(srcdir). #include "kern/i386/realmode.S" and "kern/i386/loader.S" fail in startup.S.

Uhm I just noticed that previously existing #includes have relative paths,
e.g.:

#include "lzo1x.S"

Perhaps I should have done the same instead of adding new include dirs.

Thoughts?

Quoted 8 lines
Quoted 5 lines

For kern/i386/pc/startup.S:

#include "../realmode.S" // include pc-independent i386 realmode code

Should work without any -I option.

I considered that, but wouldn't it break compilation when building in-tree, ie without an obj directory?

Why would it?

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
#5 lore raw
Quoted 5 lines · Robert Millan
Quoted 4 lines · walt
Quoted 2 lines · Christian Franke

For kern/i386/pc/startup.S:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

#include "../realmode.S" // include pc-independent i386 realmode code

Should work without any -I option.

I considered that, but wouldn't it break compilation when building in-tree, ie without an obj directory?

Why would it?

Hm. It did yesterday when I was tired. Today, it works okay. Obviously black magic at work :o)