1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:57:36 +00:00

Switch over to building everything with i686-elf-g++.

This commit is contained in:
Andreas Kling 2019-02-22 10:45:32 +01:00
parent afa6f88039
commit 75b100673f
17 changed files with 58 additions and 75 deletions

View file

@ -71,19 +71,19 @@ APPS = \
ARCH_FLAGS =
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc
USERLAND_FLAGS = -ffreestanding -fno-stack-protector
USERLAND_FLAGS =
WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough
FLAVOR_FLAGS = -march=i686 -m32 -fno-exceptions -fno-rtti
FLAVOR_FLAGS = -fno-exceptions -fno-rtti
OPTIMIZATION_FLAGS = -Os
INCLUDE_FLAGS = -I.. -I. -I../LibC
DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
CXX = clang
LD = ld
CXX = i686-elf-g++
LD = i686-elf-ld
AR = ar
LDFLAGS = -static --strip-debug -melf_i386 -e _start --gc-sections
LDFLAGS = -static -e _start
all: $(OBJS) $(APPS)

View file

@ -19,7 +19,7 @@ struct GlobalState {
char hostname[32];
pid_t sid;
uid_t uid;
termios termios;
struct termios termios;
bool was_interrupted { false };
};
static GlobalState* g;
@ -159,7 +159,7 @@ static int sh_mp(int, char**)
return 1;
}
printf("mapped file @ %p\n", data);
printf("contents: %c%c%c%c%c%c%c...\n", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]);
printf("contents: %c%c%c%c%c%c%c%c...\n", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]);
printf("leaving it open :)\n");
return 0;

View file

@ -52,7 +52,7 @@ int show_all()
perror("opendir");
return 1;
}
char pathbuf[256];
char pathbuf[PATH_MAX];
while (auto* de = readdir(dirp)) {
if (de->d_name[0] == '.')