From d7e58bab5bd702d6222a2eb8283aca068e37555b Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Mar 2023 03:17:31 +0200 Subject: [PATCH] Update vscode-cpptools config --- .vscode/c_cpp_properties.json | 82 ++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 5 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index b1e7ad6..d5d00a5 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,7 +1,7 @@ { "configurations": [ { - "name": "Linux", + "name": "Fennix x64 (Linux, GCC, debug)", "includePath": [ "${workspaceFolder}/libc/include/**", "${workspaceFolder}/out/system/include/**", @@ -10,21 +10,93 @@ ], "defines": [ "__debug_vscode__", + "KERNEL_NAME=\"Fennix\"", + "KERNEL_VERSION=\"1.0\"", "GIT_COMMIT=\"0000000000000000000000000000000000000000\"", "GIT_COMMIT_SHORT=\"0000000\"", + "a64", "DEBUG=\"1\"" ], - "compilerPath": "/usr/bin/gcc", + "compilerPath": "${workspaceFolder}/../tools/cross/bin/amd64-elf-gcc", "cStandard": "c17", "cppStandard": "c++20", "intelliSenseMode": "gcc-x64", "configurationProvider": "ms-vscode.makefile-tools", "compilerArgs": [ + // Compiler flags + "-fPIC", + "-fPIE", + "-pie", + "-march=x86-64", "-pipe", - "-nostdinc++", - "-nostdinc", + "-ffunction-sections", "-fno-builtin", - "-ffreestanding" + + // C++ flags + "-fexceptions", + + // Linker flags + "-fPIC", + "-fPIE", + "-pie", + "-nostdlib", + "-nodefaultlibs", + "-nolibc", + "-zmax-page-size=0x1000", + "-static", + + // VSCode flags + "-ffreestanding", + "-nostdinc", + "-nostdinc++" + ] + }, + { + "name": "Fennix x32 (Linux, GCC, debug)", + "includePath": [ + "${workspaceFolder}/include/**" + ], + "defines": [ + "__debug_vscode__", + "KERNEL_NAME=\"Fennix\"", + "KERNEL_VERSION=\"1.0\"", + "GIT_COMMIT=\"0000000000000000000000000000000000000000\"", + "GIT_COMMIT_SHORT=\"0000000\"", + "a32", + "DEBUG=\"1\"" + ], + "compilerPath": "${workspaceFolder}/../tools/cross/bin/i686-elf-gcc", + "cStandard": "c17", + "cppStandard": "c++20", + "intelliSenseMode": "gcc-x86", + "configurationProvider": "ms-vscode.makefile-tools", + "compilerArgs": [ + // Compiler flags + "-fPIC", + "-fPIE", + "-pie", + "-march=i686", + "-pipe", + "-ffunction-sections", + "-fno-builtin", + + // C++ flags + "-fexceptions", + + // Linker flags + "-fPIC", + "-fPIE", + "-pie", + "-nostdlib", + "-nodefaultlibs", + "-nolibc", + "-zmax-page-size=0x1000", + "-static", + + // VSCode flags + "-ffreestanding", + "-nostdinc", + "-nostdinc++" ] } ],