Skip to content

Instantly share code, notes, and snippets.

View g-berthiaume's full-sized avatar

G. Berthiaume g-berthiaume

View GitHub Profile
@g-berthiaume
g-berthiaume / Makefile
Created September 18, 2025 01:02 — forked from skeeto/Makefile
skeetocrt example CRT
ALL = skeetocrt.dll skeetocrt.dll.a crt0.o
all: $(ALL)
skeetocrt.dll skeetocrt.dll.a: skeetocrt.c stdio.h
cc -shared -g3 -fno-builtin -nostartfiles --entry=0 \
-Wl,--out-implib=skeetocrt.dll.a -o skeetocrt.dll skeetocrt.c
crt0.o: crt0.c stdio.h
cc -c -g3 -fno-builtin -nostdlib -nostdinc -isystem . -o crt0.o crt0.c
// Did you know that [Compiler Explorer](godbolt.org) allows you to include any file
// from the internet ?
//
// Just add the following line to your C source:
//
// #include
// <https://gist.githubusercontent.com/g-berthiaume/84160d113e5639e480eae9a0ef3af1ba/raw/1fde54c83ec3ff74dad536e0bb36d14d4db4e36b/godbolt_utils.h>
//
// This file's purpose is to create a collection of utilities for increasing my productivity on
// godbolt. This file is unlicensed. Do what you want with it. :^)
@g-berthiaume
g-berthiaume / Useful GCC Compiler Options.md
Created December 31, 2018 18:27
A useful list of gcc compiler options

Useful GCC Compiler Options

A non exhaustive list of gcc compiler options.

$ gcc myprog.c -o myprog -Wall -Wextra -pedantic -std=c11 [...]

Optimization: