Runtime detection of gcc include paths
PATCH 1/1 Runtime detection of gcc include paths
Update pre-process.c to do runtime detection of gcc's internal include paths.
This uses the same method as previously was used, it just performs the lookup at runtime.
I do not believe this will work for cross-compiles, though, I believe the fix will be fairly trivial. (Given that I don't cross-compile, I'm not quite sure what the exact mechanisms to do so are.)
This should set things up to be able to provide packaged versions. My next patch will (probably) be everything necessary to build a Debian package.
# This is a BitKeeper generated patch for the following project:
# Project Name: TSCT - The Silly C Tokenizer
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.355 -> 1.356 # Makefile 1.23 -> 1.24 # pre-process.c 1.65 -> 1.67
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/08 ryan@mythryan2.(none) 1.356
# Rework the way gcc internal includes are found to be done entirely at run-time. # --------------------------------------------
#
Makefile +2 -4
@@ -32,7 +32,7 @@ expression.o: $(LIB_H) lib.o: $(LIB_H) parse.o: $(LIB_H) -pre-process.o: $(LIB_H) pre-process.h +pre-process.o: $(LIB_H) scope.o: $(LIB_H) show-parse.o: $(LIB_H) symbol.o: $(LIB_H)
@@ -40,8 +40,6 @@ test-parsing.o: $(LIB_H) tokenize.o: $(LIB_H) -pre-process.h: - echo "#define GCC_INTERNAL_INCLUDE \"`$(CC) -print-file-name=include`\"" > pre-process.h clean: - rm -f *.[oasi] core core.[0-9]* $(PROGRAMS) pre-process.h + rm -f *.[oasi] core core.[0-9]* $(PROGRAMS)
pre-process.c +64 -4
92 lines not on this page · raw message
Signature · 2 lines
Ryan Anderson sometimes Pug Majere
Quoted 3 lines · Ryan Anderson
This uses the same method as previously was used, it just performs the lookup at runtime.
I much prefer a compile-time thing.
Performance is, to me, paramount for "checker". I don't want to slow it down, I'm hoping that some day we can just enable C=1 by default in the kernel build (this is a _long_ time off, though, don't you all start worrying now).
I don't see anything wrong with a compile/install time thing, that is, after all, how gcc too works.
Linus
Followup to: <[email protected]> By author: Linus Torvalds <[email protected]> In newsgroup: linux.dev.kernel
Quoted 8 lines · Ryan Anderson
Quoted 3 lines
This uses the same method as previously was used, it just performs the lookup at runtime.
I much prefer a compile-time thing.
Quoted 8 lines
Performance is, to me, paramount for "checker". I don't want to slow it down, I'm hoping that some day we can just enable C=1 by default in the kernel build (this is a _long_ time off, though, don't you all start worrying now).
I don't see anything wrong with a compile/install time thing, that is, after all, how gcc too works.
Both of these seem a little unnecessary. Why not pass this stuff on the command line, and have the top-level Makefile extract the paths into a command-line argument?
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64