diff --git a/kernel/Makefile b/kernel/Makefile
index cb78162e..5b8373c8 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -188,8 +188,8 @@ endif
%.o: %.cpp
$(HOSTCXX) -c $< -o $@ $(CPPFLAGS) $(CXXFLAGS)
-%.o: %.s
- $(HOSTAS) $< -o $@ $(ASFLAGS)
+%.o: %.S
+ $(HOSTCXX) -c $< -o $@ $(CPPFLAGS) $(CXXFLAGS)
clean:
rm -f $(ALLOBJS) sortix.bin
diff --git a/kernel/x64/base.s b/kernel/x64/base.S
similarity index 99%
rename from kernel/x64/base.s
rename to kernel/x64/base.S
index d93801c3..0ef50e9d 100644
--- a/kernel/x64/base.s
+++ b/kernel/x64/base.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x64/base.s
+ x64/base.S
Bootstraps the kernel and passes over control from the boot-loader to the
kernel main function.
diff --git a/kernel/x64/boot.s b/kernel/x64/boot.S
similarity index 99%
rename from kernel/x64/boot.s
rename to kernel/x64/boot.S
index 793a1c8c..75c2c3e5 100644
--- a/kernel/x64/boot.s
+++ b/kernel/x64/boot.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x64/boot.s
+ x64/boot.S
Bootstraps the kernel and passes over control from the boot-loader to the
kernel main function. It also jumps into long mode!
diff --git a/kernel/x64/calltrace.s b/kernel/x64/calltrace.S
similarity index 98%
rename from kernel/x64/calltrace.s
rename to kernel/x64/calltrace.S
index 2cc976a2..3c31b490 100644
--- a/kernel/x64/calltrace.s
+++ b/kernel/x64/calltrace.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x64/calltrace.s
+ x64/calltrace.S
Attempts to unwind the stack and prints the code locations where functions
were called. This greatly aids debugging.
diff --git a/kernel/x64/crti.s b/kernel/x64/crti.S
similarity index 98%
rename from kernel/x64/crti.s
rename to kernel/x64/crti.S
index f51ce61f..f3e7dfa4 100644
--- a/kernel/x64/crti.s
+++ b/kernel/x64/crti.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x64/crti.s
+ x64/crti.S
Provides the header of the _init and _fini functions.
*******************************************************************************/
diff --git a/kernel/x64/crtn.s b/kernel/x64/crtn.S
similarity index 98%
rename from kernel/x64/crtn.s
rename to kernel/x64/crtn.S
index f70b562d..d63b3e5e 100644
--- a/kernel/x64/crtn.s
+++ b/kernel/x64/crtn.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x64/crtn.s
+ x64/crtn.S
Provides the tail of the _init and _fini functions.
*******************************************************************************/
diff --git a/kernel/x64/interrupt.s b/kernel/x64/interrupt.S
similarity index 99%
rename from kernel/x64/interrupt.s
rename to kernel/x64/interrupt.S
index dfae05f0..1df22946 100644
--- a/kernel/x64/interrupt.s
+++ b/kernel/x64/interrupt.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x64/interrupt.s
+ x64/interrupt.S
Transfers control to interrupt handlers when interrupts happen.
*******************************************************************************/
diff --git a/kernel/x64/kthread.s b/kernel/x64/kthread.S
similarity index 99%
rename from kernel/x64/kthread.s
rename to kernel/x64/kthread.S
index 4b2f438f..7e3564ae 100644
--- a/kernel/x64/kthread.s
+++ b/kernel/x64/kthread.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x64/kthread.s
+ x64/kthread.S
Utilities and synchronization mechanisms for x64 kernel threads.
*******************************************************************************/
diff --git a/kernel/x64/syscall.s b/kernel/x64/syscall.S
similarity index 99%
rename from kernel/x64/syscall.s
rename to kernel/x64/syscall.S
index 0e574543..05f87c1a 100644
--- a/kernel/x64/syscall.s
+++ b/kernel/x64/syscall.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x64/syscall.s
+ x64/syscall.S
An assembly stub that acts as glue for system calls.
*******************************************************************************/
diff --git a/kernel/x86/base.s b/kernel/x86/base.S
similarity index 99%
rename from kernel/x86/base.s
rename to kernel/x86/base.S
index e5656308..e6b533fb 100644
--- a/kernel/x86/base.s
+++ b/kernel/x86/base.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x86/base.s
+ x86/base.S
Bootstraps the kernel and passes over control from the boot-loader to the
kernel main function.
diff --git a/kernel/x86/boot.s b/kernel/x86/boot.S
similarity index 99%
rename from kernel/x86/boot.s
rename to kernel/x86/boot.S
index c03bc7f4..50910e2d 100644
--- a/kernel/x86/boot.s
+++ b/kernel/x86/boot.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x86/boot.s
+ x86/boot.S
Bootstraps the kernel and passes over control from the boot-loader to the
kernel main function.
diff --git a/kernel/x86/calltrace.s b/kernel/x86/calltrace.S
similarity index 98%
rename from kernel/x86/calltrace.s
rename to kernel/x86/calltrace.S
index 6df77f49..735874b4 100644
--- a/kernel/x86/calltrace.s
+++ b/kernel/x86/calltrace.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x86/calltrace.s
+ x86/calltrace.S
Attempts to unwind the stack and prints the code locations where functions
were called. This greatly aids debugging.
diff --git a/kernel/x86/crti.s b/kernel/x86/crti.S
similarity index 98%
rename from kernel/x86/crti.s
rename to kernel/x86/crti.S
index 6a9adfe0..4bc034d4 100644
--- a/kernel/x86/crti.s
+++ b/kernel/x86/crti.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x86/crti.s
+ x86/crti.S
Provides the header of the _init and _fini functions.
*******************************************************************************/
diff --git a/kernel/x86/crtn.s b/kernel/x86/crtn.S
similarity index 98%
rename from kernel/x86/crtn.s
rename to kernel/x86/crtn.S
index 13ab8252..d1329e77 100644
--- a/kernel/x86/crtn.s
+++ b/kernel/x86/crtn.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x86/crtn.s
+ x86/crtn.S
Provides the tail of the _init and _fini functions.
*******************************************************************************/
diff --git a/kernel/x86/interrupt.s b/kernel/x86/interrupt.S
similarity index 99%
rename from kernel/x86/interrupt.s
rename to kernel/x86/interrupt.S
index 90d065df..b58c5ff6 100644
--- a/kernel/x86/interrupt.s
+++ b/kernel/x86/interrupt.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x86/interrupt.s
+ x86/interrupt.S
Transfers control to interrupt handlers when interrupts happen.
*******************************************************************************/
diff --git a/kernel/x86/kthread.s b/kernel/x86/kthread.S
similarity index 99%
rename from kernel/x86/kthread.s
rename to kernel/x86/kthread.S
index 4a7077c8..7849e503 100644
--- a/kernel/x86/kthread.s
+++ b/kernel/x86/kthread.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x86/kthread.s
+ x86/kthread.S
Utilities and synchronization mechanisms for x86 kernel threads.
*******************************************************************************/
diff --git a/kernel/x86/syscall.s b/kernel/x86/syscall.S
similarity index 99%
rename from kernel/x86/syscall.s
rename to kernel/x86/syscall.S
index 346a5cb7..8f63f10a 100644
--- a/kernel/x86/syscall.s
+++ b/kernel/x86/syscall.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License along with
Sortix. If not, see .
- x86/syscall.s
+ x86/syscall.S
An assembly stub that acts as glue for system calls.
*******************************************************************************/
diff --git a/libc/Makefile b/libc/Makefile
index 70a59a1f..d9bec2ca 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -575,8 +575,8 @@ headers:
%.o: %.cpp
$(HOSTCXX) -c $< -o $@ $(CPPFLAGS) $(FLAGS) $(CXXFLAGS)
-%.o: %.s
- $(HOSTAS) $(ASFLAGS) $< -o $@
+%.o: %.S
+ $(HOSTCXX) -c $< -o $@ $(CPPFLAGS) $(FLAGS) $(CFLAGS)
# libc-sortix
sortix/%.o: %.c
diff --git a/libc/x64/calltrace.s b/libc/x64/calltrace.S
similarity index 98%
rename from libc/x64/calltrace.s
rename to libc/x64/calltrace.S
index 2cd33749..11eb18e7 100644
--- a/libc/x64/calltrace.s
+++ b/libc/x64/calltrace.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x64/calltrace.s
+ x64/calltrace.S
Attempts to unwind the stack and prints the code locations where functions
were called. This greatly aids debugging.
diff --git a/libc/x64/crt1.s b/libc/x64/crt1.S
similarity index 99%
rename from libc/x64/crt1.s
rename to libc/x64/crt1.S
index 2834d109..fc15e315 100644
--- a/libc/x64/crt1.s
+++ b/libc/x64/crt1.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x64/crt1.s
+ x64/crt1.S
Implement the _start symbol at which execution begins which performs the
task of initializing the standard library and executing the main function.
diff --git a/libc/x64/crti.s b/libc/x64/crti.S
similarity index 98%
rename from libc/x64/crti.s
rename to libc/x64/crti.S
index 5ea0e723..a4f84e71 100644
--- a/libc/x64/crti.s
+++ b/libc/x64/crti.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x64/crti.s
+ x64/crti.S
Provides the header of the _init and _fini functions.
*******************************************************************************/
diff --git a/libc/x64/crtn.s b/libc/x64/crtn.S
similarity index 98%
rename from libc/x64/crtn.s
rename to libc/x64/crtn.S
index ce472c53..ea93c81e 100644
--- a/libc/x64/crtn.s
+++ b/libc/x64/crtn.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x64/crtn.s
+ x64/crtn.S
Provides the tail of the _init and _fini functions.
*******************************************************************************/
diff --git a/libc/x64/fork.s b/libc/x64/fork.S
similarity index 99%
rename from libc/x64/fork.s
rename to libc/x64/fork.S
index a4e6a889..7933c79b 100644
--- a/libc/x64/fork.s
+++ b/libc/x64/fork.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x64/fork.s
+ x64/fork.S
Assembly functions related to forking x64 processes.
*******************************************************************************/
diff --git a/libc/x64/setjmp.s b/libc/x64/setjmp.S
similarity index 99%
rename from libc/x64/setjmp.s
rename to libc/x64/setjmp.S
index 24f44b2a..f3a653f2 100644
--- a/libc/x64/setjmp.s
+++ b/libc/x64/setjmp.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x64/setjmp.s
+ x64/setjmp.S
Implement the assembly part of setjmp.
*******************************************************************************/
diff --git a/libc/x64/signal.s b/libc/x64/signal.S
similarity index 98%
rename from libc/x64/signal.s
rename to libc/x64/signal.S
index dd9d9822..298ea978 100644
--- a/libc/x64/signal.s
+++ b/libc/x64/signal.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x64/signal.s
+ x64/signal.S
An assembly stub that for handling unix signals.
*******************************************************************************/
diff --git a/libc/x64/syscall.s b/libc/x64/syscall.S
similarity index 99%
rename from libc/x64/syscall.s
rename to libc/x64/syscall.S
index 363e8a7e..10622859 100644
--- a/libc/x64/syscall.s
+++ b/libc/x64/syscall.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x64/syscall.s
+ x64/syscall.S
Function for performing system calls.
*******************************************************************************/
diff --git a/libc/x86/calltrace.s b/libc/x86/calltrace.S
similarity index 98%
rename from libc/x86/calltrace.s
rename to libc/x86/calltrace.S
index 3ebfa904..7156e682 100644
--- a/libc/x86/calltrace.s
+++ b/libc/x86/calltrace.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x86/calltrace.s
+ x86/calltrace.S
Attempts to unwind the stack and prints the code locations where functions
were called. This greatly aids debugging.
diff --git a/libc/x86/crt1.s b/libc/x86/crt1.S
similarity index 99%
rename from libc/x86/crt1.s
rename to libc/x86/crt1.S
index 1d7be001..9f623c8d 100644
--- a/libc/x86/crt1.s
+++ b/libc/x86/crt1.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x86/crt1.s
+ x86/crt1.S
Implement the _start symbol at which execution begins which performs the
task of initializing the standard library and executing the main function.
diff --git a/libc/x86/crti.s b/libc/x86/crti.S
similarity index 98%
rename from libc/x86/crti.s
rename to libc/x86/crti.S
index fb8a3ff0..22b6ff15 100644
--- a/libc/x86/crti.s
+++ b/libc/x86/crti.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x86/crti.s
+ x86/crti.S
Provides the header of the _init and _fini functions.
*******************************************************************************/
diff --git a/libc/x86/crtn.s b/libc/x86/crtn.S
similarity index 98%
rename from libc/x86/crtn.s
rename to libc/x86/crtn.S
index 9f546ab9..a0feb6a0 100644
--- a/libc/x86/crtn.s
+++ b/libc/x86/crtn.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x86/crtn.s
+ x86/crtn.S
Provides the tail of the _init and _fini functions.
*******************************************************************************/
diff --git a/libc/x86/fork.s b/libc/x86/fork.S
similarity index 99%
rename from libc/x86/fork.s
rename to libc/x86/fork.S
index ccfc2a71..e3ba4af6 100644
--- a/libc/x86/fork.s
+++ b/libc/x86/fork.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x86/fork.s
+ x86/fork.S
Assembly functions related to forking x86 processes.
*******************************************************************************/
diff --git a/libc/x86/setjmp.s b/libc/x86/setjmp.S
similarity index 98%
rename from libc/x86/setjmp.s
rename to libc/x86/setjmp.S
index 5e590214..13f230ae 100644
--- a/libc/x86/setjmp.s
+++ b/libc/x86/setjmp.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x86/setjmp.s
+ x86/setjmp.S
Implement the assembly part of setjmp.
*******************************************************************************/
diff --git a/libc/x86/signal.s b/libc/x86/signal.S
similarity index 98%
rename from libc/x86/signal.s
rename to libc/x86/signal.S
index 120cc29f..3825af72 100644
--- a/libc/x86/signal.s
+++ b/libc/x86/signal.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x86/signal.s
+ x86/signal.S
An assembly stub that for handling unix signals.
*******************************************************************************/
diff --git a/libc/x86/syscall.s b/libc/x86/syscall.S
similarity index 99%
rename from libc/x86/syscall.s
rename to libc/x86/syscall.S
index 422589c0..046248e7 100644
--- a/libc/x86/syscall.s
+++ b/libc/x86/syscall.S
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- x86/syscall.s
+ x86/syscall.S
Function for performing system calls.
*******************************************************************************/