summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMan, Jianting (Meco) <[email protected]>2023-04-06 21:44:31 -0400
committerGitHub <[email protected]>2023-04-07 09:44:31 +0800
commita3d8c76e37510f43546bb384c58ed4188e166440 (patch)
treed97dd2a11dfd22f42ca0f301dd4f6958200d278d
parent1c5c49b773bd28bd8f16ce713d16c08cd8bb390f (diff)
[tools] comment out GenerateGCCConfig revert part of #7177 (#7188)
-rw-r--r--tools/gcc.py72
1 files changed, 38 insertions, 34 deletions
diff --git a/tools/gcc.py b/tools/gcc.py
index d806e6f3f0..905845f825 100644
--- a/tools/gcc.py
+++ b/tools/gcc.py
@@ -199,43 +199,47 @@ def GCCResult(rtconfig, str):
return result
def GenerateGCCConfig(rtconfig):
- str = ''
- cc_header = ''
- cc_header += '#ifndef CCONFIG_H__\n'
- cc_header += '#define CCONFIG_H__\n'
- cc_header += '/* Automatically generated file; DO NOT EDIT. */\n'
- cc_header += '/* compiler configure file for RT-Thread in GCC*/\n\n'
+ # The cconfig.h will NOT generate in the lastest RT-Thread code.
+ # When you want to use it, you can uncomment out the following code.
- if CheckHeader(rtconfig, 'newlib.h'):
- str += '#include <newlib.h>\n'
- cc_header += '#define HAVE_NEWLIB_H 1\n'
- cc_header += '#define LIBC_VERSION "newlib %s"\n\n' % GetNewLibVersion(rtconfig)
+ # str = ''
+ # cc_header = ''
+ # cc_header += '#ifndef CCONFIG_H__\n'
+ # cc_header += '#define CCONFIG_H__\n'
+ # cc_header += '/* Automatically generated file; DO NOT EDIT. */\n'
+ # cc_header += '/* compiler configure file for RT-Thread in GCC*/\n\n'
- if CheckHeader(rtconfig, 'sys/signal.h'):
- str += '#include <sys/signal.h>\n'
- cc_header += '#define HAVE_SYS_SIGNAL_H 1\n'
- if CheckHeader(rtconfig, 'sys/select.h'):
- str += '#include <sys/select.h>\n'
- cc_header += '#define HAVE_SYS_SELECT_H 1\n'
- if CheckHeader(rtconfig, 'pthread.h'):
- str += "#include <pthread.h>\n"
- cc_header += '#define HAVE_PTHREAD_H 1\n'
+ # if CheckHeader(rtconfig, 'newlib.h'):
+ # str += '#include <newlib.h>\n'
+ # cc_header += '#define HAVE_NEWLIB_H 1\n'
+ # cc_header += '#define LIBC_VERSION "newlib %s"\n\n' % GetNewLibVersion(rtconfig)
- # if CheckHeader(rtconfig, 'sys/dirent.h'):
- # str += '#include <sys/dirent.h>\n'
+ # if CheckHeader(rtconfig, 'sys/signal.h'):
+ # str += '#include <sys/signal.h>\n'
+ # cc_header += '#define HAVE_SYS_SIGNAL_H 1\n'
+ # if CheckHeader(rtconfig, 'sys/select.h'):
+ # str += '#include <sys/select.h>\n'
+ # cc_header += '#define HAVE_SYS_SELECT_H 1\n'
+ # if CheckHeader(rtconfig, 'pthread.h'):
+ # str += "#include <pthread.h>\n"
+ # cc_header += '#define HAVE_PTHREAD_H 1\n'
- # add some common features
- str += 'const char* version = __VERSION__;\n'
- str += 'const int iso_c_visible = __ISO_C_VISIBLE;\n'
- str += '\n#ifdef HAVE_INITFINI_ARRAY\n'
- str += 'const int init_fini_array = HAVE_INITFINI_ARRAY;\n'
- str += '#endif\n'
+ # # if CheckHeader(rtconfig, 'sys/dirent.h'):
+ # # str += '#include <sys/dirent.h>\n'
- cc_header += '\n'
- cc_header += GCCResult(rtconfig, str)
- cc_header += '\n#endif\n'
+ # # add some common features
+ # str += 'const char* version = __VERSION__;\n'
+ # str += 'const int iso_c_visible = __ISO_C_VISIBLE;\n'
+ # str += '\n#ifdef HAVE_INITFINI_ARRAY\n'
+ # str += 'const int init_fini_array = HAVE_INITFINI_ARRAY;\n'
+ # str += '#endif\n'
- cc_file = open('cconfig.h', 'w')
- if cc_file:
- cc_file.write(cc_header)
- cc_file.close()
+ # cc_header += '\n'
+ # cc_header += GCCResult(rtconfig, str)
+ # cc_header += '\n#endif\n'
+
+ # cc_file = open('cconfig.h', 'w')
+ # if cc_file:
+ # cc_file.write(cc_header)
+ # cc_file.close()
+ pass