ObjFW  Check-in [23da92beab]

Overview
Comment:Port to latest devkitARM
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 23da92beab284352edff033dd2032933cb4ab93422ebcf9a53ded02bd03ef722
User & Date: js on 2024-11-14 00:27:33
Other Links: manifest | tags
Context
2024-11-14
01:58
Increase ObjFW library version Leaf check-in: 73af26b775 user: js tags: trunk
00:27
Port to latest devkitARM check-in: 23da92beab user: js tags: trunk
2024-11-13
23:46
OFOpenSSLTLSStream: Use more error codes check-in: fa9652e096 user: js tags: trunk
Changes

Modified .github/workflows/nintendo-ds.yml from [16b1656c2b] to [19802372c6].

9
10
11
12
13
14
15
16

17
18

19
20
21
22
23
24

25
26

27








28
29
30
31
32

33
34

35
9
10
11
12
13
14
15

16
17

18
19
20
21
22
23

24
25

26
27
28
29
30
31
32
33
34
35
36
37
38
39

40
41

42
43







-
+

-
+





-
+

-
+

+
+
+
+
+
+
+
+




-
+

-
+

    - uses: actions/checkout@v4
    - name: autogen.sh
      run: ./autogen.sh
    - name: configure
      run: |
        docker run \
          -e DEVKITPRO=/opt/devkitpro \
          -e PATH="/opt/devkitpro/devkitARM/bin:$PATH" \
          -e PATH="/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH" \
          -v "$PWD:/objfw" \
          devkitpro/devkitarm:20241104 \
          devkitpro/devkitarm \
          sh -c 'cd /objfw && ./configure --host=arm-none-eabi --with-nds'
    - name: make
      run: |
        docker run \
          -e DEVKITPRO=/opt/devkitpro \
          -e PATH="/opt/devkitpro/devkitARM/bin:$PATH" \
          -e PATH="/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH" \
          -v "$PWD:/objfw" \
          devkitpro/devkitarm:20241104 \
          devkitpro/devkitarm \
          sh -c "cd /objfw && make -j$(nproc)"
    - name: make tests.nds
      run: |
        docker run \
          -e DEVKITPRO=/opt/devkitpro \
          -e PATH="/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH" \
          -v "$PWD:/objfw" \
          devkitpro/devkitarm \
          sh -c "cd /objfw/tests && make tests.nds"
    - name: make install
      run: |
        docker run \
          -e DEVKITPRO=/opt/devkitpro \
          -e PATH="/opt/devkitpro/devkitARM/bin:$PATH" \
          -e PATH="/opt/devkitpro/devkitARM/bin:/opt/devkitpro/tools/bin:$PATH" \
          -v "$PWD:/objfw" \
          devkitpro/devkitarm:20241104 \
          devkitpro/devkitarm \
          sh -c "cd /objfw && make install"

Modified configure.ac from [5d1179e386] to [0cee982cd2].

234
235
236
237
238
239
240
241
242





243
244
245
246
247
248







249
250
251
252
253
254
255
234
235
236
237
238
239
240


241
242
243
244
245
246





247
248
249
250
251
252
253
254
255
256
257
258
259
260







-
-
+
+
+
+
+

-
-
-
-
-
+
+
+
+
+
+
+







	AS_IF([test x"$DEVKITPRO" = x""], [
		AC_MSG_ERROR([DEVKITPRO is not set! Please set DEVKITPRO.])
	])

	flags="-march=armv5te -mtune=arm946e-s -mthumb -mthumb-interwork"
	OBJCFLAGS="$OBJCFLAGS $flags"
	OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS $flags"
	CPPFLAGS="$CPPFLAGS -DARM9 -I$DEVKITPRO/libnds/include"
	OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -DARM9 -I\$DEVKITPRO/libnds/include"
	CPPFLAGS="$CPPFLAGS -DARM9 -D__NDS__ -I$DEVKITPRO/libnds/include"
	CPPFLAGS="$CPPFLAGS -I$DEVKITPRO/calico/include"
	OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -DARM9 -D__NDS__"
	OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -I\$DEVKITPRO/libnds/include"
	OBJFW_CPPFLAGS="$OBJFW_CPPFLAGS -I\$DEVKITPRO/calico/include"
	ASFLAGS="$ASFLAGS -march=armv5te"
	LDFLAGS="$LDFLAGS -specs=ds_arm9.specs"
	OBJFW_LDFLAGS="$OBJFW_LDFLAGS -specs=ds_arm9.specs"
	tmp="-L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9"
	LIBS="$LIBS $tmp"
	OBJFW_LIBS="$OBJFW_LIBS $tmp"
	LDFLAGS="$LDFLAGS -specs=$DEVKITPRO/calico/share/ds9.specs"
	OBJFW_LDFLAGS="$OBJFW_LDFLAGS -specs=\$DEVKITPRO/calico/share/ds9.specs"
	LIBS="$LIBS -L$DEVKITPRO/libnds/lib -L$DEVKITPRO/calico/lib"
	LIBS="$LIBS -lfilesystem -lfat -lnds9 -lcalico_ds9"
	OBJFW_LIBS="$OBJFW_LIBS -L\$DEVKITPRO/libnds/lib"
	OBJFW_LIBS="$OBJFW_LIBS -L\$DEVKITPRO/calico/lib"
	OBJFW_LIBS="$OBJFW_LIBS -lfilesystem -lfat -lnds9 -lcalico_ds9"
	enable_shared="no"
	enable_threads="no"	# TODO
	enable_sockets="no"	# TODO
	check_pedantic="no"

	AC_DEFINE(OF_NINTENDO_DS, 1, [Whether we are compiling for Nintendo DS])
	AC_SUBST(USE_SRCS_NINTENDO_DS, '${SRCS_NINTENDO_DS}')

Modified src/OFApplication.m from [b5933f5ef1] to [30b931e27d].

497
498
499
500
501
502
503

504

505
506
507
508
509
510
511
497
498
499
500
501
502
503
504

505
506
507
508
509
510
511
512







+
-
+







	_argv = argv;

	encoding = [OFLocale encoding];

#ifndef OF_NINTENDO_DS
	if (*argc > 0) {
#else
	if (g_envNdsArgvHeader->magic == ENV_NDS_ARGV_MAGIC &&
	if (__system_argv->argvMagic == ARGV_MAGIC && __system_argv->argc > 0) {
	    g_envNdsArgvHeader->argc > 0) {
#endif
		_programName = [[OFString alloc] initWithCString: (*argv)[0]
							encoding: encoding];
		arguments = [[OFMutableArray alloc] init];
		_arguments = arguments;

		for (int i = 1; i < *argc; i++)

Modified tests/Makefile from [895a4be7e6] to [e726c1ead4].

244
245
246
247
248
249
250
251

252
253
254
255
256
257
258
244
245
246
247
248
249
250

251
252
253
254
255
256
257
258







-
+







${PROG_NOINST}.arm9: ${PROG_NOINST}
	arm-none-eabi-objcopy -O binary $< $@

${PROG_NOINST}.nds: ${PROG_NOINST}.arm9 testfile.txt
	rm -fr nds-data
	mkdir -p nds-data
	cp testfile.txt nds-data
	ndstool -c $@ -9 ${PROG_NOINST} -d nds-data
	ndstool -c $@ -7 ${DEVKITPRO}/calico/bin/ds7_maine.elf -9 ${PROG_NOINST} -d nds-data
	rm -fr nds-data

${PROG_NOINST}.nro: ${PROG_NOINST} testfile.txt
	rm -fr romfs
	mkdir -p romfs
	cp testfile.txt romfs
	nacptool --create "ObjFW tests" "Jonathan Schleifer" \