gcc-4.1-no-search-pch-20060227.patch

来自「linux下编译交叉工具链的工具源码」· PATCH 代码 · 共 34 行

PATCH
34
字号
Little hack to let you turn off searching for precompiled headers.Really just here for benchmarking the effect on the preprocessor.Signed-off-by: dank@kegel.comdiff -Nuar gcc-4.1-20060217/libcpp/files.c gcc-4.1-20060227/libcpp/files.c--- gcc-4.1-20060217/libcpp/files.c	2005-11-03 18:10:19.000000000 -0800+++ gcc-4.1-20060227/libcpp/files.c	2006-02-27 17:20:35.000000000 -0800@@ -28,6 +28,7 @@ #include "mkdeps.h" #include "hashtab.h" #include "md5.h"+#include <stdlib.h> #include <dirent.h>  /* Variable length record files on VMS will have a stat size that includes@@ -248,9 +249,16 @@   char *pchname;   struct stat st;   bool valid = false;+  static int my_first_run = 1;+  static int my_gcc_no_search_pch;++  if (my_first_run) {+    my_gcc_no_search_pch = (getenv("GCC_NO_SEARCH_PCH") != NULL);+    my_first_run = 0;+  }    /* No PCH on <stdin> or if not requested.  */-  if (file->name[0] == '\0' || !pfile->cb.valid_pch)+  if (file->name[0] == '\0' || !pfile->cb.valid_pch || my_gcc_no_search_pch)     return false;    flen = strlen (path);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?