Index: boot/arch/riscv64/src/asm.S
===================================================================
--- boot/arch/riscv64/src/asm.S	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ boot/arch/riscv64/src/asm.S	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -108,5 +108,5 @@
 	or t0, t0, t1
 
-	csrw sptbr, t0
+	csrw satp, t0
 
 	/* Jump to supervisor mode */
Index: kernel/arch/riscv64/src/mm/page.c
===================================================================
--- kernel/arch/riscv64/src/mm/page.c	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ kernel/arch/riscv64/src/mm/page.c	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -85,6 +85,6 @@
 
 	asm volatile (
-	    "csrw sptbr, %[satp]\n"
-	    :: [satp] "r" (satp)
+	    "csrw satp, %[satpv]\n"
+	    :: [satpv] "r" (satp)
 	);
 }
Index: tools/toolchain.sh
===================================================================
--- tools/toolchain.sh	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ tools/toolchain.sh	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -31,6 +31,6 @@
 BINUTILS_GDB_GIT="https://github.com/HelenOS/binutils-gdb.git"
 
-BINUTILS_BRANCH="binutils-2_41-helenos"
-BINUTILS_VERSION="2.41"
+BINUTILS_BRANCH="binutils-2_43-helenos"
+BINUTILS_VERSION="2.43"
 
 GDB_BRANCH="gdb-13.2-helenos"
@@ -38,6 +38,6 @@
 
 GCC_GIT="https://github.com/HelenOS/gcc.git"
-GCC_BRANCH="13_2_0-helenos"
-GCC_VERSION="13.2"
+GCC_BRANCH="14_2_0-helenos"
+GCC_VERSION="14.2"
 
 BASEDIR="$PWD"
@@ -419,4 +419,5 @@
 		--enable-languages=c,c++,go \
 		--enable-lto \
+		--enable-obsolete \
 		--disable-shared \
 		--disable-werror \
Index: uspace/drv/block/virtio-blk/virtio-blk.c
===================================================================
--- uspace/drv/block/virtio-blk/virtio-blk.c	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ uspace/drv/block/virtio-blk/virtio-blk.c	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -365,5 +365,5 @@
 	}
 
-	vdev->queues = calloc(sizeof(virtq_t), num_queues);
+	vdev->queues = calloc(num_queues, sizeof(virtq_t));
 	if (!vdev->queues) {
 		rc = ENOMEM;
Index: uspace/drv/nic/virtio-net/virtio-net.c
===================================================================
--- uspace/drv/nic/virtio-net/virtio-net.c	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ uspace/drv/nic/virtio-net/virtio-net.c	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -221,5 +221,5 @@
 	}
 
-	vdev->queues = calloc(sizeof(virtq_t), num_queues);
+	vdev->queues = calloc(num_queues, sizeof(virtq_t));
 	if (!vdev->queues) {
 		rc = ENOMEM;
Index: uspace/lib/c/arch/arm32/src/atomic.c
===================================================================
--- uspace/lib/c/arch/arm32/src/atomic.c	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ uspace/lib/c/arch/arm32/src/atomic.c	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -86,4 +86,111 @@
 }
 
+unsigned char __atomic_exchange_1(volatile void *mem0, unsigned char val,
+    int model)
+{
+	volatile unsigned char *mem = mem0;
+
+	(void) model;
+
+	unsigned ret;
+
+	/*
+	 * The following instructions between labels 1 and 2 constitute a
+	 * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
+	 * the kernel will restart it.
+	 */
+	asm volatile (
+	    "1:\n"
+	    "	adr %[ret], 1b\n"
+	    "	str %[ret], %[rp0]\n"
+	    "	adr %[ret], 2f\n"
+	    "	str %[ret], %[rp1]\n"
+	    "	ldrb %[ret], %[addr]\n"
+	    "	strb %[imm], %[addr]\n"
+	    "2:\n"
+	    : [ret] "=&r" (ret),
+	      [rp0] "=m" (ras_page[0]),
+	      [rp1] "=m" (ras_page[1]),
+	      [addr] "+m" (*mem)
+	    : [imm] "r" (val)
+	);
+
+	ras_page[0] = 0;
+	ras_page[1] = 0xffffffff;
+
+	return ret;
+}
+
+unsigned short __atomic_exchange_2(volatile void *mem0, unsigned short val,
+    int model)
+{
+	volatile unsigned short *mem = mem0;
+
+	(void) model;
+
+	unsigned ret;
+
+	/*
+	 * The following instructions between labels 1 and 2 constitute a
+	 * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
+	 * the kernel will restart it.
+	 */
+	asm volatile (
+	    "1:\n"
+	    "	adr %[ret], 1b\n"
+	    "	str %[ret], %[rp0]\n"
+	    "	adr %[ret], 2f\n"
+	    "	str %[ret], %[rp1]\n"
+	    "	ldrh %[ret], %[addr]\n"
+	    "	strh %[imm], %[addr]\n"
+	    "2:\n"
+	    : [ret] "=&r" (ret),
+	      [rp0] "=m" (ras_page[0]),
+	      [rp1] "=m" (ras_page[1]),
+	      [addr] "+m" (*mem)
+	    : [imm] "r" (val)
+	);
+
+	ras_page[0] = 0;
+	ras_page[1] = 0xffffffff;
+
+	return ret;
+}
+
+unsigned __atomic_exchange_4(volatile void *mem0, unsigned val, int model)
+{
+	volatile unsigned *mem = mem0;
+
+	(void) model;
+
+	unsigned ret;
+
+	/*
+	 * The following instructions between labels 1 and 2 constitute a
+	 * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
+	 * the kernel will restart it.
+	 */
+	asm volatile (
+	    "1:\n"
+	    "	adr %[ret], 1b\n"
+	    "	str %[ret], %[rp0]\n"
+	    "	adr %[ret], 2f\n"
+	    "	str %[ret], %[rp1]\n"
+	    "	ldr %[ret], %[addr]\n"
+	    "	str %[imm], %[addr]\n"
+	    "2:\n"
+	    : [ret] "=&r" (ret),
+	      [rp0] "=m" (ras_page[0]),
+	      [rp1] "=m" (ras_page[1]),
+	      [addr] "+m" (*mem)
+	    : [imm] "r" (val)
+	);
+
+	ras_page[0] = 0;
+	ras_page[1] = 0xffffffff;
+
+	return ret;
+}
+
 unsigned short __atomic_fetch_add_2(volatile void *mem0, unsigned short val,
     int model)
@@ -164,4 +271,12 @@
 }
 
+bool __atomic_test_and_set(volatile void *ptr, int memorder)
+{
+	volatile unsigned char *b = ptr;
+
+	unsigned char orig = __atomic_exchange_n(b, (unsigned char) true, memorder);
+	return orig != 0;
+}
+
 void __sync_synchronize(void)
 {
Index: uspace/lib/cpp/include/__bits/io/ios.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/io/ios.hpp	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ uspace/lib/cpp/include/__bits/io/ios.hpp	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -403,5 +403,5 @@
                 delete[] parray_;
                 parray_size_ = rhs.parray_size_;
-                parray_ = new long[parray_size_];
+                parray_ = new void *[parray_size_];
 
                 for (size_t i = 0; i < parray_size_; ++i)
Index: uspace/lib/trackmod/protracker.c
===================================================================
--- uspace/lib/trackmod/protracker.c	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ uspace/lib/trackmod/protracker.c	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -146,5 +146,5 @@
 
 	cells = module->channels * protracker_pattern_rows;
-	buf = calloc(sizeof(uint32_t), cells);
+	buf = calloc(cells, sizeof(uint32_t));
 
 	if (buf == NULL) {
@@ -156,5 +156,5 @@
 		module->pattern[i].rows = protracker_pattern_rows;
 		module->pattern[i].channels = module->channels;
-		module->pattern[i].data = calloc(sizeof(trackmod_cell_t), cells);
+		module->pattern[i].data = calloc(cells, sizeof(trackmod_cell_t));
 		if (module->pattern[i].data == NULL) {
 			rc = ENOMEM;
@@ -326,5 +326,5 @@
 
 	module->instrs = samples;
-	module->instr = calloc(sizeof(trackmod_instr_t), samples);
+	module->instr = calloc(samples, sizeof(trackmod_instr_t));
 	if (module->instr == NULL) {
 		printf("Out of memory.\n");
@@ -334,5 +334,5 @@
 
 	module->patterns = patterns;
-	module->pattern = calloc(sizeof(trackmod_pattern_t), patterns);
+	module->pattern = calloc(patterns, sizeof(trackmod_pattern_t));
 	if (module->pattern == NULL) {
 		printf("Out of memory.\n");
@@ -343,5 +343,5 @@
 	/* Order list */
 	module->ord_list_len = order_list->order_list_len;
-	module->ord_list = calloc(sizeof(size_t), module->ord_list_len);
+	module->ord_list = calloc(module->ord_list_len, sizeof(size_t));
 	if (module->ord_list == NULL) {
 		printf("Out of memory.\n");
Index: uspace/lib/trackmod/xm.c
===================================================================
--- uspace/lib/trackmod/xm.c	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ uspace/lib/trackmod/xm.c	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -66,5 +66,5 @@
 	}
 
-	module->ord_list = calloc(sizeof(size_t), module->ord_list_len);
+	module->ord_list = calloc(module->ord_list_len, sizeof(size_t));
 	if (module->ord_list == NULL) {
 		printf("Out of memory.\n");
@@ -176,5 +176,5 @@
 	int ret;
 
-	module->pattern = calloc(sizeof(trackmod_pattern_t), module->patterns);
+	module->pattern = calloc(module->patterns, sizeof(trackmod_pattern_t));
 	if (module->pattern == NULL) {
 		rc = ENOMEM;
@@ -208,6 +208,6 @@
 		module->pattern[i].rows = rows;
 		module->pattern[i].channels = module->channels;
-		module->pattern[i].data = calloc(sizeof(trackmod_cell_t),
-		    rows * module->channels);
+		module->pattern[i].data = calloc(rows * module->channels,
+		    sizeof(trackmod_cell_t));
 
 		if (module->pattern[i].data == NULL) {
Index: uspace/srv/vfs/vfs_register.c
===================================================================
--- uspace/srv/vfs/vfs_register.c	(revision 1fa629278c12955a4a1792e6fd19f28ffcb4e398)
+++ uspace/srv/vfs/vfs_register.c	(revision 56210a7aca94cc904bb253efade72fb9a4cc1a40)
@@ -369,5 +369,5 @@
 	}
 
-	fstypes->fstypes = calloc(sizeof(char *), count);
+	fstypes->fstypes = calloc(count, sizeof(char *));
 	if (fstypes->fstypes == NULL) {
 		free(fstypes->buf);
