{"id":19297195,"url":"https://github.com/ushitora-anqou/aqcc","last_synced_at":"2025-04-15T23:47:31.379Z","repository":{"id":63305168,"uuid":"140147451","full_name":"ushitora-anqou/aqcc","owner":"ushitora-anqou","description":"Yet another tiny tiny self-hosted C compiler, assembler, linker and standard C library.","archived":false,"fork":false,"pushed_at":"2019-06-04T12:12:03.000Z","size":548,"stargazers_count":197,"open_issues_count":2,"forks_count":23,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T02:51:27.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ushitora-anqou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-08T07:39:15.000Z","updated_at":"2025-03-27T15:36:08.000Z","dependencies_parsed_at":"2022-11-16T16:45:57.923Z","dependency_job_id":null,"html_url":"https://github.com/ushitora-anqou/aqcc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ushitora-anqou%2Faqcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ushitora-anqou%2Faqcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ushitora-anqou%2Faqcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ushitora-anqou%2Faqcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ushitora-anqou","download_url":"https://codeload.github.com/ushitora-anqou/aqcc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173060,"owners_count":21224481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T23:01:47.395Z","updated_at":"2025-04-15T23:47:31.364Z","avatar_url":"https://github.com/ushitora-anqou.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# AnQou C Compiler: aqcc\n\naqcc is yet another tiny self-hosted C compiler with an also tiny assembler,\nlinker and standard C library.\n\n## To Build\n\nJust `make`.\n\n## Usage\n\n`./aqcc [options] file...`\n\n`options` are:\n\n- `-S`: output an assembly file.\n- `-c`: output an object file.\n- `-o`: set the output file name.\n\nTo find the detail, try `make selfself_test`, which tells you all the things.\n\n## Note\n\n- aqcc is a product of [Security Camp 2018](https://www.ipa.go.jp/jinzai/camp/2018/zenkoku2018_index.html).\nSpecial thanks to @rui314 san and @hikalium san.\n- Many features, functions and so on have not yet been implemented in aqcc\nthat a C compiler generally has.\nFeel free to implement missing features and to send pull requests :)\n\n\n---------\n\nAnQou C Compiler の使い方\n\n## aqcc をビルド\n\n`make` としてください。生成物を削除したいときは、 `make clean` などとしてください。\n\n## aqcc の挙動をテスト\n\n- `make test` \n    - 第一世代（gccなどによりコンパイルされたaqcc）をテスト\n- `make self_test`\n    - 第二世代（第一世代によりコンパイルされたaqcc）をテスト\n- `make selfself_test`\n    - 第三世代（第二世代によりコンパイルされたaqcc）をテスト\n    - 第二世代と第三世代に違いがないことも確認されます。\n\n## 一般のCファイルをコンパイル\n\n`./aqcc [options] file...`\n\n`options` には以下のようなものを使用できます。\n\n- `-S`\n    アセンブリファイルを出力します。\n- `-c`\n    オブジェクトファイルを出力します。\n- `-o out`\n    出力ファイル名を指定できます。\n\n`program.c` を以下のようにしてコンパイルし、実行できます。\n`aqcc` や `program.c` などは適宜読みかえてください。\n\n```\n$ ./aqcc program.c -o program\n$ ./program\n```\n\nなお、`#include \u003cstdio.h\u003e` などとはできません。\n`program.c` の中にこのような構文が含まれている場合は、取り除いて下さい。\nその代わりに、自前で `puts()` 関数などの プロトタイプ宣言を `program.c` の冒頭に加えてください。\nなお、カレントディレクトリ内のファイルはインクルードできますので、 `#include \"aqcc.h\"` などとインクルードして、\n`aqcc.h` に記されているプロトタイプ宣言を流用できます。\n\nまた、標準ライブラリのうち提供されている機能はごく僅かです。\n`stdlib.c` などを参照して下さい。aqccが自動でこれらをリンクすることはありません。明示的に指定してください。\n\n## 謝辞\n\naqccは[セキュリティキャンプ全国大会2018](https://www.ipa.go.jp/jinzai/camp/2018/zenkoku2018_index.html)の成果物です。\n講師の@rui314さんと@hikaliumさんに深く感謝申し上げます。\n\n## 資料\n\n- [セルフホストCコンパイラaqcc 開発記](https://anqou.net/poc/2018/08/21/post-1853/)\n    - セキュリティキャンプの前日にセルフホストを達成するまでのaqcc開発日記。\n- [ seccamp2018でセルフホストCコンパイラをつくった](https://speakerdeck.com/anqou/seccamp2018deseruhuhosutockonpairawotukututa)\n    - Kernel/VM関西9回目での発表資料。\n    - [ベストオブ頭おかしい発表に選ばれました](https://twitter.com/kernelvm/status/1044153390060625920)。ありがとうございます。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fushitora-anqou%2Faqcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fushitora-anqou%2Faqcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fushitora-anqou%2Faqcc/lists"}